Update .github/workflows/black.yml to be concurrent #599
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Waf Python Tests | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 1 * * *" # 3 AM CET | ||
push: | ||
pull_request: | ||
jobs: | ||
waf: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [Windows, Linux] | ||
runs-on: [self-hosted, "${{ matrix.os }}", builder] | ||
name: ${{ matrix.os }} Waf | ||
env: | ||
python: python3 | ||
steps: | ||
- name: Rename python3 to python on Windows | ||
if: runner.os == 'Windows' | ||
run: echo "python=python" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Configure | ||
run: ${{ env.python }} waf configure | ||
- name: Build | ||
run: ${{ env.python }} waf | ||
- name: Test | ||
run: ${{ env.python }} waf --run_tests | ||
# Cancel previous in-progress when pushing: https://stackoverflow.com/a/72408109 | ||
concurrency: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
# Cancel previous in-progress when pushing: https://stackoverflow.com/a/72408109 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
cancel-in-progress: true |