From 71f1bc0ced27cae603b27b6f1e2b915fde96e54e Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Wed, 10 Jul 2024 09:44:52 +0200 Subject: [PATCH 1/3] ci: replace custom lint job with pre-commit/action --- .github/workflows/ci.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 487d1346..e5700840 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,26 +48,17 @@ jobs: # 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/action@v3.0.1 + with: + extra_args: --all-files --color=always tests: runs-on: ubuntu-22.04 From 7b552d4540d8970fba2641d995c827770cf2dae3 Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Thu, 18 Jul 2024 17:24:01 +0200 Subject: [PATCH 2/3] ci: adjust ci workflow settings --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5700840..98a9b3e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,16 +6,14 @@ 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: From 53095c9c6512a1b343c48a71ed701198e3db2b4b Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Thu, 18 Jul 2024 17:24:49 +0200 Subject: [PATCH 3/3] ci: remove obsolete docs job for better readability --- .github/workflows/ci.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98a9b3e4..cd893bc0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,34 +17,6 @@ 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-24.04 steps: