-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (44 loc) · 1.43 KB
/
lints.yml
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
44
45
46
47
48
49
50
name: "Lints"
on:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
defaults:
run:
shell: bash
# do we really want nixos-unstable?
env:
NIX_PATH: "nixpkgs=channel:nixos-unstable"
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PR_NUMBER: ${{ github.event.number }}
jobs:
deadnix:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- run: |
nix run github:astro/deadnix -- --edit --no-lambda-pattern-names
TMPFILE=$(mktemp)
git diff >"${TMPFILE}"
git stash -u && git stash drop
nix-shell -p reviewdog --run "reviewdog -f=diff -f.diff.strip=1 -reporter=github-pr-review < \"${TMPFILE}\""
nixprof:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: |
nix profile install github:Kha/nixprof
nixprof record nix develop .#ghc8107 --accept-flake-config
nixprof report -p
nixprof report -a
nixprof report -s
# FIXME: is that the right way to publish a report on GitHub?
# curl -s -H "Authorization: token $GITHUB_TOKEN" -X POST -d "{\"body\": \"$report\"}" "https://api.github.com/repos/input-output-hk/haskell.nix/issues/$PR_NUMBER/comments"