-
Notifications
You must be signed in to change notification settings - Fork 16
56 lines (51 loc) · 1.32 KB
/
project-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 ${{ matrix.project }}
apptainer build --fakeroot ${matrix.project}.sif apptainer.def
- name: Run tests in Apptainer container
run: |
apptainer exec --fakeroot ${matrix.project}.sif poetry run pytest