Skip to content

Allow making releases via Github UI without CI failing #154

Allow making releases via Github UI without CI failing

Allow making releases via Github UI without CI failing #154

Workflow file for this run

name: CI (pixi)
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions: {}
jobs:
tests:
name: "Tests, Python ${{ matrix.python-version }}"
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- uses: prefix-dev/setup-pixi@5185adfbffb4bd703da3010310260805d89ebb11 # v0.9.6
with:
environments: dev
pixi-version: "latest"
- name: Check if manifest has changed
run: pixi run --environment dev fractal-manifest check --package fractal-tasks-core
- name: Cache Pooch folder
id: cache-pooch-folder
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/pooch
key: pooch-cache
- name: Run tests with pytest
env:
COVERAGE_FILE: coverage-data-${{ matrix.python-version }}
run: pixi run --environment dev coverage run -m pytest tests
- name: Upload coverage data
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-data-${{ matrix.python-version }}
path: coverage-data-${{ matrix.python-version }}*
coverage:
name: Coverage
runs-on: ubuntu-24.04
needs: [tests]
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
# The git operations in python-coverage-comment-action utilize the
# token stored by actions/checkout.
# https://github.com/py-cov-action/python-coverage-comment-action/issues/610
persist-credentials: true
- uses: prefix-dev/setup-pixi@5185adfbffb4bd703da3010310260805d89ebb11 # v0.9.6
with:
environments: dev
pixi-version: "latest"
- name: Download data
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: coverage-data-*
merge-multiple: true
- name: Combine coverage
run: pixi run --environment dev coverage combine coverage-data-*
- name: Add coverage comment to Pull Requests
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@5d8df5979747514c914e1c5a12335a7cf9a2745f # v4.1
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 90
MINIMUM_ORANGE: 60
ANNOTATE_MISSING_LINES: true
ANNOTATION_TYPE: notice