Skip to content

Move tests from Azure to GitHub Actions #1

Move tests from Azure to GitHub Actions

Move tests from Azure to GitHub Actions #1

Workflow file for this run

name: TestSuite
on: [push, pull_request]
jobs:
get_python_versions:
name: "Determine Python versions"
runs-on: ubuntu-latest
outputs:
min-python: ${{ steps.nep29.outputs.min-python }}
max-python: ${{ steps.nep29.outputs.max-python }}
steps:
- name: "calculate versions according to NEP29"
id: nep29
uses: mstimberg/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
testing:
needs: [get_python_versions, pre-commit]

Check failure on line 20 in .github/workflows/testsuite.yml

View workflow run for this annotation

GitHub Actions / TestSuite

Invalid workflow file

The workflow is not valid. .github/workflows/testsuite.yml (Line: 20, Col: 34): Job 'testing' depends on unknown job 'pre-commit'.
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }} (32bit: ${{ matrix.float_dtype_32 }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macOS-11]
float_dtype_32: [false, true]
python-version: ["${{ needs.get_python_versions.outputs.max-python }}"]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Conda and Python
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false
channels: conda-forge,defaults
channel-priority: true
activate-environment: 'test_env'
python-version: ${{ matrix.python-version }}
- name: Install Brian2 and dependencies
run: |
conda install -n test_env --quiet --yes -c conda-forge pip pytest cython sympy future pyparsing numpy jinja2 six scipy sphinx gsl coverage
pip install .
- name: Run Tests
run: |
cd $GITHUB_WORKSPACE/.. # move out of the workspace to avoid direct import
if [ $FLOAT_DTYPE_32 == 'true' ]; then
python -Wd $GITHUB_WORKSPACE/scripts/run_brian_tests_CPU_32bit.py
else
python -Wd $GITHUB_WORKSPACE/scripts/run_brian_tests_CPU.py
fi
env:
AGENT_OS: ${{runner.os}}
FLOAT_DTYPE_32: ${{ matrix.float_dtype_32 }}