-
Notifications
You must be signed in to change notification settings - Fork 13
91 lines (73 loc) · 2.15 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
name: Continuous integration
concurrency:
group: ${{ github.head_ref }}${{ github.ref }}-wallet-sdk
cancel-in-progress: true
on:
pull_request:
branches:
- 'main'
- 'release/*'
push:
branches:
- 'main'
- 'release/*'
jobs:
build-and-test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install wasm-pack
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Install
run: npm install && npm i @rollup/rollup-linux-x64-gnu
- name: Eslint
run: npx eslint .
- name: Build
run: npm run build
- name: Run coverage test
run: npm run coverage
- name: Test integration node-cjs
working-directory: integration-tests/node/cjs
run: npm i && node test.cjs
- name: Test integration node-esm
working-directory: integration-tests/node/esm
run: npm i && node test.mjs
- name: Npm audit
uses: oke-py/npm-audit-action@v2.4.4
with:
audit_level: moderate
create_issues: false
github_token: ${{ secrets.GITHUB_TOKEN }}
production_flag: true
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: coverallsapp/github-action@v2
with:
file: "coverage/lcov.info"
- name: Jest Coverage Comment
uses: MishaKav/jest-coverage-comment@v1.0.23
with:
coverage-summary-path: coverage/coverage-summary.json
junitxml-path: coverage/junit.xml
junitxml-title: JUnit
- name: Publish lcov report
uses: actions/upload-artifact@v3
with:
name: lcov-report.zip
path: coverage/lcov-report
if-no-files-found: error