Testing infra #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.changes }} | |
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 }} | |
singularity build --fakeroot ${{ matrix.project }}.sif apptainer.def | |
- name: Run tests in Apptainer container | |
run: | | |
singularity exec --fakeroot ${{ matrix.project }}.sif poetry run pytest |