Skip to content

Directly specify fftlength in config #564

Directly specify fftlength in config

Directly specify fftlength in config #564

Workflow file for this run

name: library tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches:
- main
jobs:
# first job users filters to output which libraries
# and projects have updates that need testing
changes:
runs-on: ubuntu-latest
outputs:
libraries: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: .github/lib-filters.yaml
if: github.event.pull_request.draft == false
# second job takes those outputs and runs
# unit tests on these libs and projects
tests:
runs-on: ubuntu-latest
needs: changes
strategy:
fail-fast: false # is this desired behavior here?
matrix:
library: ${{ fromJSON(needs.changes.outputs.libraries) }}
exclude:
# don't run non-existent .github/workflow tests,
# and exclude projects, whose tests are run in
# a different CI script
- library: 'workflow'
permissions:
packages: read
container:
# container with python and git
image: cicirello/pyaction:4.32
volumes:
- ${{ github.workspace }}:/github/workspace
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# build the libraries environment
-
name: build environment
env:
test_dir: /github/workspace/libs/${{ matrix.library }}
run: |
apt-get update
apt-get install -y build-essential
apt-get clean
python -m pip install poetry
cd $test_dir
poetry install
shell: bash
# run its unit tests inside that environment
-
name: run tests
env:
test_dir: /github/workspace/libs/${{ matrix.library }}
run: |
cd $test_dir
poetry run pytest
shell: bash