-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #512 from afuetterer/ci
ci: replace custom lint job with pre-commit/action
- Loading branch information
Showing
1 changed file
with
7 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,68 +6,29 @@ on: | |
pull_request: | ||
|
||
concurrency: | ||
group: ci-${{ github.head_ref }} | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHONUNBUFFERED: 1 | ||
FORCE_COLOR: 1 # colored output by pytest etc. | ||
CLICOLOR_FORCE: 1 # colored output by ruff | ||
|
||
permissions: | ||
contents: read | ||
permissions: {} # Set permissions at the job level. | ||
|
||
jobs: | ||
|
||
# TODO: disable docs build until decision is made | ||
|
||
# docs: | ||
# runs-on: ubuntu-22.04 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - name: Set up Python 3.11 | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: '3.11' | ||
# - name: Cache python dependencies | ||
# uses: actions/cache@v4 | ||
# with: | ||
# path: ~/.cache/pip | ||
# key: pip-docs-${{ hashFiles('pyproject.toml') }} | ||
# restore-keys: | | ||
# pip-docs- | ||
# - name: Install python dependencies | ||
# run: | | ||
# python -m pip install .[docs] | ||
# python -m pip show fuji | ||
# - name: Build documentation | ||
# env: | ||
# READTHEDOCS: 'True' | ||
# run: | | ||
# # TODO: add W flag back after fixing warnings | ||
# SPHINXOPTS='-n' make -C docs html | ||
|
||
lint: | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache python dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/.cache/pre-commit | ||
key: lint-${{ hashFiles('.pre-commit-config.yaml', 'pyproject.toml') }} | ||
restore-keys: | | ||
lint- | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install hatch | ||
- run: hatch run lint | ||
cache: pip | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --color=always | ||
|
||
tests: | ||
runs-on: ubuntu-22.04 | ||
|