Skip to content

Commit

Permalink
Merge pull request #512 from afuetterer/ci
Browse files Browse the repository at this point in the history
ci: replace custom lint job with pre-commit/action
  • Loading branch information
huberrob authored Jul 23, 2024
2 parents 87adea3 + 53095c9 commit 75c1199
Showing 1 changed file with 7 additions and 46 deletions.
53 changes: 7 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 75c1199

Please sign in to comment.