-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (110 loc) · 3.24 KB
/
ci.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: "CI"
on:
pull_request:
push:
branches:
- "main"
- "releases/*"
schedule:
- cron: '20 2 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-javascript:
name: "JavaScript Tests"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- [ self-hosted linux arm64 ]
- [ self-hosted linux x86 ]
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install Nix"
uses: cachix/install-nix-action@v23
- name: "Cache Dependencies"
id: cache
uses: actions/cache@v3
with:
key: npm-${{ matrix.os }}-${{ hashFiles('package-lock.json') }}
path: ./node_modules
restore-keys: |
npm-feature-${{ matrix.os }}-${{ hashFiles('package-lock.json') }}
npm-feature-${{ matrix.os }}-
npm-feature-
npm-
- name: "Install Dependencies"
if: steps.cache.outputs.cache-hit != 'true'
run: nix develop --command npm ci
- name: "Check Format"
run: nix develop --command npm run format:check
- name: "Lint"
run: nix develop --command npm run lint
- name: "Test"
run: nix develop --command npm run ci-test
test-minimal-action:
name: "Minimal - Github Action Test"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- [ self-hosted linux arm64 ]
- [ self-hosted linux x86 ]
# TODO: test with different flox versions
#flox-version:
# - stable
# - prerelease
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Test Local Action"
uses: ./
with:
github-access-token: ${{ secrets.NIX_GIT_TOKEN }}
- name: "Build Example"
env:
# XXX: This is needed until we are in this limbo state and our "new" ui is
# not ready yet
FLOX_BASH_PASSTHRU: true
run: |
cd example
flox build --no-write-lock-file
test-all-action:
name: "All - Github Action Test"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- [ self-hosted linux arm64 ]
- [ self-hosted linux x86 ]
# TODO: test with different flox versions
#flox-version:
# - stable
# - prerelease
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Test Local Action"
uses: ./
with:
github-access-token: ${{ secrets.NIX_GIT_TOKEN }}
substituter: s3://flox-store
substituter-key: ${{ secrets.FLOX_STORE_PUBLIC_NIX_SECRET_KEY }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: "Build Example"
env:
# XXX: This is needed until we are in this limbo state and our "new" ui is
# not ready yet
FLOX_BASH_PASSTHRU: true
run: |
cd example
flox build --no-write-lock-file