Skip to content

Commit

Permalink
Fix CI: Python 3.8 and 3.9 are on macos-13 but not macos-latest (maco…
Browse files Browse the repository at this point in the history
…s-14-arm64) (#63)
  • Loading branch information
hugovk authored Apr 23, 2024
2 parents ac65c6f + 7a91196 commit 74d64dc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@ name: Test

on: [push, pull_request, workflow_dispatch]

permissions:
contents: read

env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1

jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: "${{ matrix.os }}-${{ matrix.os-version || 'latest' }}"
strategy:
fail-fast: false
matrix:
python-version: ["pypy3.10", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: [windows-latest, macos-latest, ubuntu-latest]
os: [Windows, macOS, Ubuntu]
# Python 3.8 and 3.9 are on macos-13 but not macos-latest (macos-14-arm64)
# https://github.com/actions/setup-python/issues/696#issuecomment-1637587760
include:
- { python-version: "3.8", os: "macOS", os-version: "13" }
- { python-version: "3.9", os: "macOS", os-version: "13" }

steps:
- uses: actions/checkout@v4
Expand All @@ -27,7 +36,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U wheel
python -m pip install -U tox
- name: Tox tests
Expand All @@ -44,7 +52,7 @@ jobs:
tox -e cog
- name: Upload coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v3.1.5
with:
flags: ${{ matrix.os }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
Expand Down
21 changes: 17 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.4.1
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.3.0
rev: 24.4.0
hooks:
- id: black

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-submodules
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.2
hooks:
- id: check-github-workflows
- id: check-renovate

- repo: https://github.com/rhysd/actionlint
rev: v1.6.27
hooks:
- id: actionlint

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
Expand All @@ -31,7 +44,7 @@ repos:
[platformdirs, pytest, python-slugify, rapidfuzz, types-freezegun, urllib3]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
rev: 1.8.0
hooks:
- id: pyproject-fmt
additional_dependencies: [tox]
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ commands =
pep --dry-run 8
pep --dry-run 3.13
pep --dry-run dead batteries
pep next

[testenv:cog]
deps =
Expand Down

0 comments on commit 74d64dc

Please sign in to comment.