-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (43 loc) · 1.65 KB
/
Copy pathci.yaml
File metadata and controls
43 lines (43 loc) · 1.65 KB
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
name: Purescript Lua CI
on:
push:
branches: [main]
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: "📥 Checkout repository"
uses: actions/checkout@v4
- name: "❄ Install Nix"
uses: cachix/install-nix-action@v26
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = https://hydra.iohk.io https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
- uses: cachix/cachix-action@v14
with:
name: purescript-lua
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: "🔨 Build & test"
run: >-
nix develop --accept-flake-config --allow-import-from-derivation --command cabal test all --test-show-details=direct
format:
runs-on: ubuntu-latest
steps:
- name: "📥 Checkout repository"
uses: actions/checkout@v4
- name: "❄ Install Nix"
uses: cachix/install-nix-action@v26
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v14
with:
name: purescript-lua
# Run on a clean checkout so `git diff` sees only what treefmt changed —
# the `tests` job regenerates test/ps/output/*/corefn.json (which treefmt
# excludes), and that churn would otherwise trip `git diff --exit-code`.
- name: "🎨 Format check"
run: nix --accept-flake-config fmt && git diff --exit-code