CI / lint (pull_request) Successful in 49s
CI / test (3.11) (pull_request) Successful in 51s
CI / test (3.12) (pull_request) Successful in 49s
CI / test (3.13) (pull_request) Successful in 52s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Failing after 51s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 56s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Failing after 55s
CI / test-with-coverage (pull_request) Skipped
115 lines
2.8 KiB
YAML
115 lines
2.8 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Setup
|
|
uses: ./.gitea/actions/install
|
|
with:
|
|
python_version: "3.12"
|
|
index_username: ${{ secrets.GITEA_USER }}
|
|
index_password: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- name: Format
|
|
run: |
|
|
source .venv/bin/activate
|
|
ruff format --check
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
needs: "lint"
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.11", "3.12", "3.13"]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Setup
|
|
uses: ./.gitea/actions/install
|
|
with:
|
|
python_version: ${{ matrix.python-version }}
|
|
index_username: ${{ secrets.GITEA_USER }}
|
|
index_password: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- name: Run Pytest
|
|
env:
|
|
QT_QPA_PLATFORM: offscreen
|
|
BEAMLINE: SIMULATED
|
|
run: |
|
|
source .venv/bin/activate
|
|
pytest ./tests/unit
|
|
|
|
test-with-beamline-plugins:
|
|
runs-on: ubuntu-latest
|
|
needs: ["lint", "test"]
|
|
strategy:
|
|
matrix:
|
|
plugin_repo: ["pxi_bec", "pxii_bec", "pxiii_bec"]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Setup
|
|
uses: ./.gitea/actions/install
|
|
with:
|
|
python_version: "3.12"
|
|
index_username: ${{ secrets.GITEA_USER }}
|
|
index_password: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- name: Install beamline plugin
|
|
run: |
|
|
source .venv/bin/activate
|
|
git clone https://gitea.psi.ch/bec/mx_bec.git
|
|
git clone https://gitea.psi.ch/bec/${{ matrix.plugin_repo }}.git
|
|
uv pip install -e ./mx_bec
|
|
uv pip install -e ./${{ matrix.plugin_repo }}
|
|
|
|
- name: Run Pytest
|
|
env:
|
|
QT_QPA_PLATFORM: offscreen
|
|
BEAMLINE: SIMULATED
|
|
run: |
|
|
source .venv/bin/activate
|
|
pytest ./tests/unit
|
|
|
|
test-with-coverage:
|
|
runs-on: ubuntu-latest
|
|
needs: ["lint", "test", "test-with-beamline-plugins"]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Setup
|
|
uses: ./.gitea/actions/install
|
|
with:
|
|
python_version: "3.12"
|
|
index_username: ${{ secrets.GITEA_USER }}
|
|
index_password: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- name: Run Pytest with Coverage
|
|
env:
|
|
QT_QPA_PLATFORM: offscreen
|
|
BEAMLINE: SIMULATED
|
|
run: |
|
|
source .venv/bin/activate
|
|
pytest --cov=aare --cov-config=./pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail ./tests/unit
|