-
Notifications
You must be signed in to change notification settings - Fork 5
75 lines (58 loc) · 1.76 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
name: CI
on:
push:
branches:
- main
- master
pull_request:
jobs:
build:
strategy:
max-parallel: 1
matrix:
mops-version: [ic-mops@1.0.0, ./cli/dist]
moc-version: [0.11.1]
node-version: [20]
runs-on: ubuntu-latest
name: node ${{ matrix.node-version }}, moc ${{ matrix.moc-version }}, ${{ matrix.mops-version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- uses: oven-sh/setup-bun@v1.1.1
- uses: dfinity/setup-dfx@main
- name: Cache mops packages
uses: actions/cache@v4
with:
key: mops-packages-${{ runner.os }}-${{ hashFiles('mops.toml') }}
restore-keys: |
mops-packages-${{ runner.os }}-${{ hashFiles('mops.toml') }}
mops-packages-${{ runner.os }}
path: |
~/.cache/mops
~/Library/Caches/mops
- name: Install npm packages
run: bun install
- name: Build local cli
if: ${{ matrix.mops-version == './cli/dist' }}
run: cd cli && npm run prepare
- name: Install mops
run: npm i -g ${{ matrix.mops-version }}
- name: Install mops packages
run: mops install
- name: Select moc version
run: mops toolchain use moc ${{ matrix.moc-version }}
- name: Run replica
run: npm run replica
- name: Deploy backend
run: npm run deploy-local
- name: Build frontend
run: npm run build-frontend
- name: Build docs
run: npm run build-docs
- name: Build blog
run: npm run build-blog
- name: Build CLI releases
run: npm run build-cli-releases