Skip to content

Commit

Permalink
[Maint, CI] Update workflow action versions and add concurrency to au…
Browse files Browse the repository at this point in the history
…to-cancel (#186)

* update action versions

* use concurrency to auto-cancel
  • Loading branch information
psobolewskiPhD authored Nov 26, 2023
1 parent a9ca7a7 commit 969fefb
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
code:
name: Code
Expand All @@ -23,9 +27,9 @@ jobs:
matrix:
task: [flake8, black, isort]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
Expand All @@ -43,10 +47,10 @@ jobs:
python-version: [ "3.8", "3.9", "3.10" ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -67,14 +71,14 @@ jobs:
# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
uses: GabrielBB/xvfb-action@v1
uses: aganders3/headless-gui@v1
with:
run: tox
env:
PLATFORM: ${{ matrix.platform }}

- name: Coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3

deploy:
# this will run when you have tagged a commit, starting with "v*"
Expand All @@ -84,9 +88,9 @@ jobs:
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
Expand Down

0 comments on commit 969fefb

Please sign in to comment.