Merge pull request #81 from dmgbuild/autoupdates/pre-commit/black-pre… #166
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
env: | |
FORCE_COLOR: "1" | |
jobs: | |
pretest: | |
name: Pre-test checks | |
runs-on: "macOS-latest" | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: "3.X" | |
- name: Lint with Pre-commit | |
uses: pre-commit/[email protected] | |
package: | |
name: Package | |
runs-on: "macOS-latest" | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: "3.X" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[dev] | |
- name: Run pre-test checks | |
run: | | |
tox -e package | |
unit-tests: | |
name: Unit tests | |
needs: pretest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev" ] | |
macOS-version: [ | |
# x86_64 runners | |
"macos-12", "macos-13", | |
# M1 runners | |
"macos-14" | |
] | |
include: | |
- experimental: false | |
- python-version: "3.13-dev" | |
experimental: true | |
exclude: | |
# actions/setup-python doesn't provide Python3.8 or 3.9 for M1. | |
- macOS-version: "macos-14" | |
python-version: "3.8" | |
- macOS-version: "macos-14" | |
python-version: "3.9" | |
runs-on: ${{ matrix.macOS-version }} | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[dev] | |
- name: Test | |
run: | | |
tox -e py |