Skip to content

Fixes action workflows #9

Fixes action workflows

Fixes action workflows #9

Workflow file for this run

# Workflow file for fast unit tests which run on all commits
name: Unit tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
- uses: chartboost/ruff-action@v1
with:
args: 'format --check'
unit-tests:
name: Unit tests
needs: ruff # avoid wasting CI time if static analysis failed
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Conda environment from environment.yaml
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment.yaml
auto-activate-base: false
- name: Install and run tests (Linux)
shell: bash -l {0}
if: runner.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install xvfb libqt5x11extras5 libgl1-mesa-glx '^libxcb.*-dev'
pip install .
xvfb-run pytest -s tests/ -m "not slow" --cov=rascal2 --cov-report=term
- name: Install and run tests (MacOS)
if: runner.os == 'macos-13'
run: |
pip install .
pytest -s tests/ -m "not slow" --cov=rascal2 --cov-report=term
- name: Install and run tests (Windows)
if: runner.os == 'windows-latest'
run: |
pip install .
pytest -s tests/ -m "not slow" --cov=rascal2 --cov-report=term