-
Notifications
You must be signed in to change notification settings - Fork 22
52 lines (50 loc) · 1.29 KB
/
frontend.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
name: Frontend
on:
push:
branches: [main]
pull_request:
paths:
- '**.ts'
- '**.js'
- '**.json'
- '**.tsx'
- '.github/workflows/frontend.yml'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node:
- 16
- 18
env:
DFX_VERSION: 0.14.3
SKIP_WASM: true
MOC_VERSION: 0.9.8
steps:
- uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dfx
run: |
echo y | DFX_VERSION=$DFX_VERSION bash -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
npm i -g ic-mops
dfx cache install
cd $(dfx cache show)
wget https://github.com/dfinity/motoko/releases/download/$MOC_VERSION/motoko-Linux-x86_64-$MOC_VERSION.tar.gz
tar zxvf motoko-Linux-x86_64-$MOC_VERSION.tar.gz
- name: Start dfx
run: |
dfx start --background
- name: Build frontend
run: |
dfx canister create --all
npm install
dfx build react_app
- name: Stop dfx
run: dfx stop