Skip to content

Testing infra

Testing infra #9

Workflow file for this run

name: project tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches:
- main
jobs:
changes:
runs-on: ubuntu-latest
outputs:
projects: ${{ steps.filter.outputs.projectchanges }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Filter project changes
id: filter
uses: dorny/paths-filter@v2
with:
filters: .github/project-filters.yaml
if: github.event.pull_request.draft == false
tests:
runs-on: ubuntu-latest
needs: changes
strategy:
fail-fast: false
matrix:
project: ${{ fromJSON(needs.changes.outputs.projects) }}
exclude:
- project: 'workflow' # Fixed the exclusion key
permissions:
packages: read
container:
image: quay.io/singularity/singularity:v3.8.1
options: --privileged
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Apptainer image
run: |
cd projects/${{ matrix.project }}
apptainer build --fakeroot ${matrix.project}.sif apptainer.def
- name: Run tests in Apptainer container
run: |
cd projects/${{ matrix.project }}
apptainer exec --fakeroot ${matrix.project}.sif poetry run pytest