Skip to content

Commit 79d1c80

Browse files
author
Your Name
committed
Run the nix flake check in CI
1 parent c25398a commit 79d1c80

1 file changed

Lines changed: 9 additions & 41 deletions

File tree

.github/workflows/main.yml

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,14 @@
1-
name: "Build"
2-
3-
permissions:
4-
contents: read
5-
pages: write
6-
id-token: write
7-
1+
name: "Test"
82
on:
9-
push:
10-
branches: [ "main" ]
113
pull_request:
12-
branches: [ "main" ]
13-
14-
# Allows you to run this workflow manually from the Actions tab
15-
workflow_dispatch:
16-
4+
push:
175
jobs:
18-
build:
6+
tests:
197
runs-on: ubuntu-latest
20-
container:
21-
image: "docker://ghcr.io/chrisdone/hell-build:2025-03-04@sha256:ca21e3be038cf1f10fa18306123b4d5f0e2009fe8938cea3afcef7f900bbea71"
22-
23-
env:
24-
# For the ~/.stack root.
25-
HOME: /root/
26-
STACK_ROOT: /root/.stack
27-
28-
# This can be both of these, depending on whether it's a PR or
29-
# main. GitHub Actions is weird.
30-
#
31-
# * "GIT_BRANCH=refs/heads/main"
32-
# * "GIT_BRANCH=cd/2024-08-28-check-examples"
33-
#
34-
GIT_BRANCH: ${{ github.head_ref || github.ref }}
35-
368
steps:
37-
- run: |
38-
git clone https://github.com/chrisdone/hell /tmp/hell && \
39-
cd /tmp/hell && \
40-
git checkout $GIT_BRANCH
41-
- run: |
42-
cd /tmp/hell && stack build --fast
43-
- run: |
44-
cd /tmp/hell && stack exec hell scripts/check-examples.hell
45-
- run: |
46-
cd /tmp/hell && HOME=/home/chris/ stack exec hell scripts/check-docs.hell
9+
- uses: actions/checkout@v5
10+
- uses: cachix/install-nix-action@v31
11+
with:
12+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
13+
- run: nix build
14+
- run: nix flake check

0 commit comments

Comments
 (0)