-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1018 Bytes
/
Copy pathtest.yml
File metadata and controls
39 lines (36 loc) · 1018 Bytes
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
on:
pull_request:
push:
branches: [main]
jobs:
flake-check:
name: nix flake check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- run: nix flake check
find-templates:
name: Find Templates
runs-on: ubuntu-latest
outputs:
folders: ${{ steps.jobs.outputs.folders }}
steps:
- uses: actions/checkout@v4
- id: jobs
run: |
folders=$(find templates -mindepth 1 -maxdepth 1 -type d | jq -R . | jq -sc .)
echo "$folders"
echo "folders=$folders" >> $GITHUB_OUTPUT
template-check:
name: Template check
needs: [find-templates]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ "ubuntu-latest", "macos-latest" ]
folder: ${{ fromJSON(needs.find-templates.outputs.folders) }}
steps:
- uses: cachix/install-nix-action@v30
- uses: actions/checkout@v4
- run: nix run .#test-templates -- ${{ matrix.folder }}