Skip to content

Commit

Permalink
ci: Refine workflows for GitHub Actions. (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan committed Sep 14, 2023
1 parent fe4550e commit c087582
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
@@ -1,5 +1,10 @@
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
ci:
if: ${{ !cancelled() && ! failure() }}
needs: dependabot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -21,6 +26,8 @@ jobs:
- '3.10'
- '3.11'
consistency:
if: ${{ !cancelled() && ! failure() }}
needs: dependabot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -89,7 +96,7 @@ jobs:
- name: Push changes if applicable
run: |
if [[ -n `git status --porcelain` ]]; then
git commit -a -m "Update constraints and sync template."
git commit -a -m "build: Update constraints for dependabot."
git push
fi
name: CI
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint-pull-request-title.yml
@@ -1,3 +1,6 @@
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
lint-title:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pages.yml
@@ -1,3 +1,6 @@
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/readthedocs-preview.yml
@@ -1,3 +1,6 @@
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
documentation-links:
runs-on: ubuntu-latest
Expand Down
@@ -1,6 +1,11 @@
[% from pathjoin("includes", "version_compare.jinja") import version_between -%]
concurrency:
cancel-in-progress: true
group: {{ '${{ github.workflow }}-${{ github.ref }}' }}
jobs:
ci:
if: {{ '${{ !cancelled() && ! failure() }}' }}
needs: dependabot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -31,6 +36,8 @@ jobs:
[%- endif %]
[%- if project_name == "Serious Scaffold Python" %]
consistency:
if: {{ '${{ !cancelled() && ! failure() }}' }}
needs: dependabot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -119,12 +126,14 @@ jobs:
[%- if version_between("3.11", min_py, max_py) %]
CI= PYTHON_VERSION=3.11 make constraints
[%- endif %]
[%- if project_name == "Serious Scaffold Python" %]
- name: Sync template
run: cp -v constraints/* template/constraints/
[%- endif %]
- name: Push changes if applicable
run: |
if [[ -n `git status --porcelain` ]]; then
git commit -a -m "Update constraints and sync template."
git commit -a -m "build: Update constraints for dependabot."
git push
fi
name: CI
Expand Down
@@ -1,3 +1,6 @@
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
lint-title:
runs-on: ubuntu-latest
Expand Down
@@ -1,3 +1,6 @@
concurrency:
cancel-in-progress: true
group: {{ '${{ github.workflow }}-${{ github.ref }}' }}
jobs:
build:
runs-on: ubuntu-latest
Expand Down
@@ -1,3 +1,6 @@
concurrency:
cancel-in-progress: true
group: {{ '${{ github.workflow }}-${{ github.ref }}' }}
jobs:
documentation-links:
runs-on: ubuntu-latest
Expand Down

0 comments on commit c087582

Please sign in to comment.