Skip to content

Commit

Permalink
Cleanup GitHub workflows (#266)
Browse files Browse the repository at this point in the history
* Update test_packages.yml

Replace deprecated workflow cleanup job

* Remove deprecated action

* Remove deprecated action

* Remove space

* Remove space

* Remove space
  • Loading branch information
stefaniapedrazzi authored Jun 29, 2022
1 parent 5cb2748 commit bebd393
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 32 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/test_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,17 @@ on:
schedule:
- cron: '0 23 * * *'

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

defaults:
run:
shell: bash


jobs:
cleanup-runs:
if: ${{ contains(github.event.pull_request.labels.*.name, 'test packages') || github.event_name == 'schedule' }}
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
test-wheel:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test packages') || github.event_name == 'schedule' }}
strategy:
matrix:
Expand Down Expand Up @@ -70,7 +66,6 @@ jobs:
pip install opendr-toolkit
python -m unittest discover -s tests/sources/tools/${{ matrix.package }}
test-docker:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test packages') || github.event_name == 'schedule' }}
strategy:
matrix:
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/tests_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@ on:
schedule:
- cron: '0 23 * * *'

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

defaults:
run:
shell: bash

jobs:
cleanup-runs:
if: ${{ contains(github.event.pull_request.labels.*.name, 'test sources') || contains(github.event.pull_request.labels.*.name, 'test tools') || contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
test-sources:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test sources') || github.event_name == 'schedule' }}
strategy:
matrix:
Expand Down Expand Up @@ -51,7 +47,6 @@ jobs:
pip install -r tests/requirements.txt
python -m unittest discover -s tests
test-tools:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test tools') || github.event_name == 'schedule' }}
strategy:
matrix:
Expand Down Expand Up @@ -115,7 +110,6 @@ jobs:
python -m unittest discover -s tests/sources/tools/${{ matrix.package }}
fi
build-wheel:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
runs-on: ubuntu-20.04
steps:
Expand All @@ -140,7 +134,6 @@ jobs:
path:
dist/*.tar.gz
build-docker:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
runs-on: ubuntu-20.04
steps:
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/tests_suite_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@ on:
schedule:
- cron: '0 23 * * *'

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

defaults:
run:
shell: bash

jobs:
cleanup-runs:
if: ${{ contains(github.event.pull_request.labels.*.name, 'test sources') || contains(github.event.pull_request.labels.*.name, 'test tools') || contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
test-sources:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test sources') || github.event_name == 'schedule' }}
strategy:
matrix:
Expand Down Expand Up @@ -52,7 +48,6 @@ jobs:
pip install -r tests/requirements.txt
python -m unittest discover -s tests
test-tools:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test tools') || github.event_name == 'schedule' }}
strategy:
matrix:
Expand Down Expand Up @@ -117,7 +112,6 @@ jobs:
python -m unittest discover -s tests/sources/tools/${{ matrix.package }}
fi
build-wheel:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
runs-on: ubuntu-20.04
steps:
Expand All @@ -143,7 +137,6 @@ jobs:
path:
dist/*.tar.gz
build-docker:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -382,4 +375,4 @@ jobs:
- name: Delete wheel artifacts
uses: geekyeggo/delete-artifact@v1
with:
name: wheel-artifact
name: wheel-artifact

0 comments on commit bebd393

Please sign in to comment.