-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.59 KB
/
test.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
name: Contract Tests
on: push
jobs:
clang-formatting-check:
name: clang-format check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'contracts/api/src'
- 'contracts/api/include/api'
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check
uses: jidicula/[email protected]
with:
clang-format-version: '16'
check-path: ${{ matrix.path }}
run-unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18]
name: Tests
steps:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: make node_modules
- name: Install CDT
run: |
curl -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" -L -o cdt.zip https://api.github.com/repos/AntelopeIO/cdt/actions/artifacts/2440855012/zip
sudo apt-get update
sudo apt install unzip libcurl4-gnutls-dev
unzip cdt.zip
sudo dpkg -i ./cdt_4.2.0-dev_amd64.deb
- name: Run checks
run: make jscheck
- name: Run tests
run: make test