Skip to content

action tests

action tests #1

Workflow file for this run

name: tests
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
if: >

Check failure on line 8 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / tests

Invalid workflow file

The workflow is not valid. .github/workflows/tests.yml (Line: 8, Col: 9): Unrecognized named-value: 'matrix'. Located at position 2 within expression: (matrix.os == 'ubuntu-latest' || !startsWith(github.ref, 'refs/heads/test')) && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != 'cmbant/camb')
(matrix.os == 'ubuntu-latest' || !startsWith(github.ref, 'refs/heads/test')) &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != 'cmbant/camb')
strategy:
fail-fast: false
matrix:
include:
- name: "Latest Python 3.12"
os: ubuntu-latest
python-version: 3.12
- name: "OS X Python 3.8"
os: macos-latest
python-version: 3.8
- name: "Windows Python 3.8"
os: windows-latest
python-version: 3.8
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- run: ln -s $(which gfortran-14) /usr/local/bin/gfortran
if: matrix.os == 'macos-latest'
- name: flake8 Lint
if: matrix.os == 'ubuntu-latest'
uses: py-actions/flake8@v2
with:
args: --select=E713,E704,E703,E714,E10,E11,E20,E22,E23,E25,E27,E301,E302,E304,E9,F405,F406,F5,F6,F7,F8,W1,W2,W3,W6 --show-source --statistics
path: camb
max-line-length: "120"
- name: Install dependencies
run: |
python --version
gfortran --version
pip install -e .
chmod +x fortran/tests/run_tests.sh
- name: Run tests
run: |
python -c "import camb; print(camb.__version__)"
python -m unittest camb.tests.camb_test
- name: HM code tests
if: matrix.os == 'ubuntu-latest'
run: |
git clone https://github.com/alexander-mead/HMcode_test_outputs.git
python -m unittest camb.tests.hmcode_test