-
Notifications
You must be signed in to change notification settings - Fork 25
102 lines (98 loc) · 2.55 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
92
93
94
95
96
97
98
99
100
101
102
name: CI
on:
push:
branches:
- master
- feature/*
- bugfix/*
- develop
pull_request:
branches:
- master
env:
ALICE_TESTNET_ADDRESS: ${{ secrets.ALICE_TESTNET_ADDRESS }}
ALICE_TESTNET_WALLET_ID: ${{ secrets.ALICE_TESTNET_WALLET_ID }}
BOB_TESTNET_ADDRESS: ${{ secrets.BOB_TESTNET_ADDRESS }}
BOB_TESTNET_WALLET_ID: ${{ secrets.BOB_TESTNET_WALLET_ID }}
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
FAUCET_CASHADDR: ${{ secrets.FAUCET_CASHADDR }}
FAUCET_WIF: ${{ secrets.FAUCET_WIF }}
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Validate Specification
run: yarn api:validate
# Pat 07.09.21: This step's build products are ignored, commenting out
# - name: Generate Mock Client
# run: yarn api:build:ts-mock
- name: Generate Server
run: yarn api:build:server
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update generated
branch: ${{ github.ref }}
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Format
run: |
yarn
yarn format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply formatting changes
branch: ${{ github.ref }}
test_browsers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- uses: microsoft/playwright-github-action@v1
- run: yarn
- run: yarn test:browser
test_node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: yarn
- run: yarn test
test_rest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: yarn
- run: yarn test:rest
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: '18.x'
- run: yarn
- run: yarn build
- uses: paambaati/codeclimate-action@v2.5.7
with:
coverageCommand: yarn coverage
debug: true