Skip to content

Commit

Permalink
ci: Fix gh action warnings (#962)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonblr committed Apr 26, 2023
1 parent 2693a8f commit 8ee0b9b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

Expand All @@ -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/
Expand All @@ -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
Expand All @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 8ee0b9b

Please sign in to comment.