diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e8c82d1d..a340ec11c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,9 +22,9 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python 3 - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: lint @@ -36,10 +36,10 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python 3 - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" @@ -54,7 +54,7 @@ jobs: python -m twine check dist/* - name: 'Upload Artifact' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: dist path: dist/ @@ -81,29 +81,18 @@ jobs: ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: "pip" + cache-dependency-path: "setup.py" - name: Upgrade pip and virtualenv to latest run: pip install --upgrade pip virtualenv - - name: Get pip cache dir - id: pip-cache - run: | - python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" - - - name: pip cache - uses: actions/cache@v2 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - - uses: stripe/openapi/actions/stripe-mock@master - name: Test with pytest @@ -125,14 +114,14 @@ jobs: needs: [build, test, lint] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Download all workflow run artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: dist path: dist - name: Set up Python 3 - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" diff --git a/Makefile b/Makefile index 5efca3bf3..c47149903 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ test-nomock: venv ci-test: venv ${VENV_NAME}/bin/python -m pip install -U tox-gh-actions - @${VENV_NAME}/bin/tox -p auto $(TOX_ARGS) + @${VENV_NAME}/bin/tox $(TOX_ARGS) coveralls: venv ${VENV_NAME}/bin/python -m pip install -U coveralls diff --git a/tox.ini b/tox.ini index a8ad1cef9..90c3f9893 100644 --- a/tox.ini +++ b/tox.ini @@ -73,10 +73,7 @@ passenv = GITHUB_* deps = coverage >= 4.5.3, < 5 # TODO: upgrade to coverage 5 when we drop support for Python 3.4 coveralls - pytest - pytest-mock commands = - coverage run --source=stripe -m pytest tests/ coverage combine coveralls --service=github depends = py{310,39,38,37,36,35,34,27,py3,py2}