File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : " Test template"
22on :
33 workflow_dispatch : # allows manual triggering
4- pull_request :
54 push :
65jobs :
76 tests :
1110 os : [ubuntu-latest]
1211 steps :
1312 - uses : actions/checkout@v4
13+ - uses : wimpysworld/nothing-but-nix@main
14+ with :
15+ ️hatchet-protocol : ' carve'
1416 - uses : cachix/install-nix-action@v31
1517 with :
1618 github_access_token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : " Test template PR"
2+ on :
3+ workflow_dispatch : # allows manual triggering
4+ pull_request :
5+ types : [opened, synchronize, reopened]
6+ pull_request_target :
7+ types : [opened, synchronize, reopened]
8+ jobs :
9+ tests :
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ matrix :
13+ os : [ubuntu-latest]
14+ steps :
15+ - uses : actions/checkout@v4
16+ with :
17+ ref : ${{ github.event.pull_request.head.sha }}
18+ token : ${{ secrets.GITHUB_TOKEN }}
19+ - uses : wimpysworld/nothing-but-nix@main
20+ with :
21+ ️hatchet-protocol : ' carve'
22+ - uses : cachix/install-nix-action@v31
23+ with :
24+ github_access_token : ${{ secrets.GITHUB_TOKEN }}
25+ - uses : DeterminateSystems/magic-nix-cache-action@main
26+ - run : nix build ./templates/n
27+ - run : nix flake check ./templates/n
28+ - name : Comment on PR (if tests fail)
29+ if : failure()
30+ uses : actions/github-script@main
31+ with :
32+ script : |
33+ github.rest.issues.createComment({
34+ issue_number: context.issue.number,
35+ owner: context.repo.owner,
36+ repo: context.repo.repo,
37+ body: '❌ Tests failed on this pull request. Please check the workflow logs for details.'
38+ })
You can’t perform that action at this time.
0 commit comments