Skip to content

Commit

Permalink
Refactor CI workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
  • Loading branch information
thombashi committed May 3, 2024
1 parent f2a1c14 commit 701cabd
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ jobs:
fetch-depth: 0
fetch-tags: true

- name: Setup Python
uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
cache: pip
cache-dependency-path: |
setup.py
Expand All @@ -54,7 +53,7 @@ jobs:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref_name }}-publish-pkg
cancel-in-progress: true
timeout-minutes: 20
timeout-minutes: 10
environment:
name: testpypi
url: https://pypi.org/p/pathvalidate
Expand All @@ -74,12 +73,12 @@ jobs:
skip-existing: true

sign-package:
needs: build-package
needs: publish-package
runs-on: ubuntu-latest
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref_name }}-sign-pkg
cancel-in-progress: true
timeout-minutes: 20
timeout-minutes: 10
permissions:
id-token: write

Expand Down Expand Up @@ -107,11 +106,23 @@ jobs:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref_name }}-lint
cancel-in-progress: true
timeout-minutes: 20
container:
image: ghcr.io/thombashi/python-ci:3.11

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
setup.py
**/*requirements.txt
tox.ini
- run: make setup-ci

- run: make check

Expand Down Expand Up @@ -180,8 +191,7 @@ jobs:

- uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down Expand Up @@ -217,8 +227,7 @@ jobs:

- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
Expand Down

0 comments on commit 701cabd

Please sign in to comment.