Skip to content

undo changes to workflow #2044

undo changes to workflow

undo changes to workflow #2044

Workflow file for this run

name: 🧪 Tests
on:
push:
branches:
- "**"
pull_request:
branches:
- main
schedule:
- cron: "0 7 * * 1"
jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Load matrix cache
id: cache-restore
uses: actions/cache/restore@v3
with:
path: /home/runner/.cache/symfem
key: symfem-matrix-cache
- uses: actions/checkout@v4
- run: pip install .[test] pytest-xdist
name: Install Symfem
- name: Install LaTeΧ
run: |
sudo apt-get update
sudo apt-get install -y texlive-latex-base texlive-latex-extra
- run: python3 -m pytest -n=auto --durations=50 test -W error
name: Run unit tests
- run: python3 -m pytest demo/test_demos.py -W error
name: Run demos
- run: python3 -m pytest scripts/test_scripts.py
name: Run scripts
- name: Save matrix cache
id: cache-save
uses: actions/cache/save@v3
with:
path: /home/runner/.cache/symfem
key: symfem-matrix-cache-${{ github.run_id }}
restore-keys: symfem-matrix-cache
if: ${{ matrix.python-version == '3.12' && github.ref == 'refs/heads/main' }}
run-tests-against-basix:
name: Run tests against Basix
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
env:
CC: gcc-10
CXX: g++-10
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Load matrix cache
id: cache-restore
uses: actions/cache/restore@v3
with:
path: /home/runner/.cache/symfem
key: symfem-matrix-cache
- run: |
sudo apt-get install -y libopenblas-dev liblapack-dev ninja-build
pip install pybind11
name: Install Basix dependencies
- uses: actions/checkout@v4
- run: pip install .[test] pytest-xdist
name: Install Symfem
- run: pip install git+https://github.com/FEniCS/basix.git
name: Install Basix
- run: python3 -m pytest -n=auto --durations=50 test/test_against_basix.py --has-basix 1 -W error
name: Run unit tests