Skip to content

Commit

Permalink
separate build and checks in ci, update pre-commit (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
rscohn2 authored Mar 29, 2022
1 parent 2fce48e commit cde2a10
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-verson: '3.10'
- name: Install prerequisites
run: |
sudo apt-get update -qq
xargs -a ubuntu-packages.txt sudo apt install -qq
python -m pip install --quiet --upgrade pip
pip install --quiet -r requirements.txt
- name: Builds and checks
- name: Checks
run: |
ONEAPI_DRAFT=true pre-commit run --all
pre-commit run --all
mkdir -p build/reuse
# ignore fail for reuse
reuse lint > build/reuse/lint.txt || true
- name: Build
env:
ONEAPI_DRAFT: true
run: |
python scripts/oneapi.py -W html
python scripts/oneapi.py -W latexpdf
- name: Archive build directory
uses: actions/upload-artifact@v1
with:
Expand Down
24 changes: 5 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,29 @@ exclude: LICENSES|source/elements

repos:
- repo: https://github.com/ambv/black
rev: 21.6b0
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pycqa/doc8
rev: 0.9.0a1
rev: 0.10.1
hooks:
- id: doc8
- repo: https://github.com/fsfe/reuse-tool
rev: v0.13.0
rev: v0.14.0
hooks:
- id: reuse
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.9.1
rev: 5.10.1
hooks:
- id: isort
- repo: local
hooks:
- id: sphinx-html
name: sphinx-html
entry: python scripts/oneapi.py -W html
language: system
pass_filenames: false
always_run: true
- id: sphinx-pdf
name: sphinx-pdf
entry: python scripts/oneapi.py -W latexpdf
language: system
pass_filenames: false
always_run: true

0 comments on commit cde2a10

Please sign in to comment.