From cde2a108caa49418089bf25cf4c4e081bbad6211 Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Tue, 29 Mar 2022 08:13:44 -0400 Subject: [PATCH] separate build and checks in ci, update pre-commit (#415) --- .github/workflows/ci.yml | 12 ++++++++---- .pre-commit-config.yaml | 24 +++++------------------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af56daf28..c7dc5b9d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da547b397..8a7476819 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,22 +9,22 @@ 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 @@ -32,20 +32,6 @@ repos: 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