-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (62 loc) · 1.74 KB
/
continuous_integration.yaml
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
name: Continuous Integration
on:
push:
jobs:
type-check:
name: Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
extra_nix_config: |
keep-derivations = true
keep-outputs = true
- run: |
mv dist/index.js dist/index.old.$GITHUB_RUN_ID.$GITHUB_RUN_NUMBER.js
nix develop --command npm install
nix develop --command npm run build
diff dist/index.old.$GITHUB_RUN_ID.$GITHUB_RUN_NUMBER.js dist/index.js
test_default_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
- run: captain --version | grep '^v1\.'
test_specific_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
version: v0.8.0
- run: captain --version | grep '^v0\.8\.0$'
test_specific_version_without_v_prefix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
version: 1.0.57
- run: captain --version | grep '^v1\.0\.57$'
test_unstable_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
version: unstable
- run: captain --version | grep '^unstable-'
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
extra_nix_config: |
keep-derivations = true
keep-outputs = true
- run: nix develop --command npm install
- run: nix develop --command npx prettier --check "src/**/*.ts"
- run: nix fmt -- --check flake.nix