-
Notifications
You must be signed in to change notification settings - Fork 28
87 lines (74 loc) · 2.24 KB
/
pr-integration-test-runner.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
name: Integration tests
on:
pull_request:
branches: [ develop, main ]
push:
branches:
- main
- developer
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
CI: 1
DEBUG: 0
DFX_VERSION: 0.11.1
DFX_WARNING: -version_check
NODE_ENV: ci
DFX_CANDID_RELEASE: 2022-01-06
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Cache Rust
uses: actions/cache@v2
id: cache-rust
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
default: true
override: true
target: wasm32-unknown-unknown
# - name: Install ic-cdk-optimizer
# if: steps.cache-rust.outputs.cache-hit != 'true'
# run: cargo install ic-cdk-optimizer
- name: Cache Dfx
id: cache-dfx
uses: actions/cache@v2
with:
path: |
/usr/local/bin/dfx
key: cache-dfx-${{ hashFiles('dfx.json') }}-
- name: Install DFX
if: steps.cache-dfx.outputs.cache-hit != 'true'
run: |
yes Y | DFX_VERSION="$DFX_VERSION" sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
- name: Cache npm modules
id: cache-npm-integration-tests
uses: actions/cache@v2
with:
path: |
$(pwd)/test/node_modules
key: cache-cache-npm-integration-tests-${{ hashFiles('./test/package.json') }}
- name: Install global npm modules
run: cd test && npm install
- name: Candid didc install
if: steps.cache-didc.outputs.cache-hit != 'true'
run: |
wget https://github.com/dfinity/candid/releases/download/"$DFX_CANDID_RELEASE"/didc-linux64
chmod +x ./didc-linux64
ln -s "$(pwd)/didc-linux64" /usr/local/bin/didc
- name: Integration tests
run: make lint && make test