Skip to content

Commit

Permalink
Update GitHub Actions to use latest action versions (#2222)
Browse files Browse the repository at this point in the history
* Update GitHub Actions to use latest action versions

* Update GitHub workflows to use ubuntu-24.04

* Update CodSpeed GitHub Action to v3

* Update test workflow to specify and exclude isort versions

* Update test workflow to specify and exclude isort versions

* Simplify Codecov upload condition in test workflow
  • Loading branch information
koxudaxi authored Dec 14, 2024
1 parent a74e8fa commit 6303d7b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
Expand All @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Checkout
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ on:

jobs:
benchmarks:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.12"
Expand All @@ -27,7 +27,7 @@ jobs:
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-codspeed-3.12-v1-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -36,7 +36,7 @@ jobs:
run: poetry install --no-interaction

- name: Run benchmarks
uses: CodSpeedHQ/action@v1
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: poetry run pytest tests/ --codspeed -n auto
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ on:

jobs:
build-deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: 'x64'

- uses: actions/cache@v1
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
if: "success() && startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pypoetry
Expand All @@ -37,7 +37,7 @@ jobs:
push_to_registry:
name: Push Docker image to Docker Hub
if: "success() && startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: build-n-publish
steps:
- name: Check out the repo
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,44 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, windows-latest, macos-latest]
isort-version: [default]
os: [ubuntu-24.04, windows-latest, macos-latest]
isort-version: [4.3.21, 5.6.4, default]
black-version: [default]
pydantic-version: [1.10.9, 2.10.3]
include:
- os: ubuntu-latest
- os: ubuntu-24.04
isort-version: 4.3.21
black-version: default
python-version: 3.8
pydantic-version: 1.5.1
- os: ubuntu-latest
- os: ubuntu-24.04
isort-version: 5.6.4
black-version: default
python-version: 3.8
pydantic-version: 1.8.2
- os: ubuntu-latest
- os: ubuntu-24.04
isort-version: 5.6.4
black-version: 19.10b0
python-version: 3.9
pydantic-version: 1.8.2
- os: ubuntu-latest
- os: ubuntu-24.04
isort-version: 5.6.4
black-version: 24.1.0
python-version: 3.12
pydantic-version: 2.4.2
- os: ubuntu-latest
- os: ubuntu-24.04
isort-version: 5.6.4
black-version: 23.12.1
python-version: 3.12
pydantic-version: 2.4.2
- os: ubuntu-latest
- os: ubuntu-24.04
isort-version: 5.6.4
black-version: 22.1.0
python-version: 3.12
pydantic-version: 2.4.2
exclude:
- isort-version: 4.3.21
- isort-version: 5.6.4
- os: windows-latest
black-version: 22.1.0
- os: macos-latest
Expand Down Expand Up @@ -105,7 +107,7 @@ jobs:
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
if: matrix.os != 'windows-latest'
with:
path: .venv
Expand Down Expand Up @@ -135,7 +137,7 @@ jobs:
source $VENV
./scripts/test.sh
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.pydantic-version != '1.5.1'
if: matrix.os == 'ubuntu-24.04'
uses: codecov/codecov-action@v5
with:
flags: unittests
Expand Down

0 comments on commit 6303d7b

Please sign in to comment.