mirror of
https://github.com/dwinkler1/np.git
synced 2026-02-19 22:40:57 -05:00
With PAT all PRs get tested
This commit is contained in:
parent
9a41c1b1c1
commit
26546c7348
1 changed files with 0 additions and 38 deletions
38
.github/workflows/check_pr.yml
vendored
38
.github/workflows/check_pr.yml
vendored
|
|
@ -1,38 +0,0 @@
|
||||||
name: "Test template PR"
|
|
||||||
on:
|
|
||||||
workflow_dispatch: # allows manual triggering
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
pull_request_target:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
jobs:
|
|
||||||
tests:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- uses: wimpysworld/nothing-but-nix@main
|
|
||||||
with:
|
|
||||||
️hatchet-protocol: 'carve'
|
|
||||||
- uses: cachix/install-nix-action@v31
|
|
||||||
with:
|
|
||||||
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
- run: nix build ./templates/n
|
|
||||||
- run: nix flake check ./templates/n
|
|
||||||
- name: Comment on PR (if tests fail)
|
|
||||||
if: failure()
|
|
||||||
uses: actions/github-script@main
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
github.rest.issues.createComment({
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
body: '❌ Tests failed on this pull request. Please check the workflow logs for details.'
|
|
||||||
})
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue