-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (55 loc) · 1.8 KB
/
check.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# SPDX-FileCopyrightText: 2022 Serokell <https://serokell.io>
#
# SPDX-License-Identifier: MPL-2.0
name: CI
on: [pull_request]
jobs:
validate:
runs-on: [self-hosted, nix]
steps:
- uses: actions/checkout@v4
- name: check trailing whitespaces
run: nix build -L .#checks.x86_64-linux.trailing-whitespace
- name: shellcheck
run: nix build -L .#checks.x86_64-linux.shellcheck
if: success() || failure()
- name: validate cabal files
run: nix develop .#ci -c ./scripts/validate-cabal-files.sh
if: success() || failure()
- name: stylish
run: nix build -L .#checks.x86_64-linux.stylish-haskell
if: success() || failure()
- name: lint
run: nix build -L .#checks.x86_64-linux.hlint
if: success() || failure()
# not working for unknown reason (OPS-1487)
# - name: xrefcheck
# run: nix run github:serokell/xrefcheck
# if: success() || failure()
- name: REUSE lint
run: nix build -L .#checks.x86_64-linux.reuse-lint
if: success() || failure()
build:
runs-on: [self-hosted, nix]
steps:
- uses: actions/checkout@v4
- name: build
run: nix build -L .#checks.x86_64-linux.build-all
test:
runs-on: [self-hosted, nix]
needs: [build]
steps:
- uses: actions/checkout@v4
- name: test
run: nix build -L .#checks.x86_64-linux.test
- name: doctest
run: nix develop .#doctest -c runghc doctest/doctests.hs
if: success() || failure()
deploy:
runs-on: [self-hosted, nix]
needs: [test]
if: ${{ github.ref == 'refs/heads/staging' }}
steps:
- uses: actions/checkout@v4
- name: deploy staging
run: nix develop .#ci -c deploy .#staging --ssh-user deploy --skip-checks