-
Notifications
You must be signed in to change notification settings - Fork 14
98 lines (80 loc) · 2.78 KB
/
tokenization.yml
File metadata and controls
98 lines (80 loc) · 2.78 KB
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
name: Tokenization
on:
pull_request:
paths:
- 'Tokenization/**/*'
- '.github/workflows/tokenization.yml'
push:
branches:
- 'dev'
jobs:
lint-check-backend:
name: Check eslint rules for backend on ubuntu-latest
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: '22.x'
- name: Install backend dependencies
run: (cd Tokenization/backend/central-system; npm i)
lint-check-webapp:
name: Check eslint rules for webapp on ubuntu-latest
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: '22.x'
- name: Install webapp dependencies
run: (cd Tokenization/webapp; npm i)
- name: Typecheck webapp
run: (cd Tokenization/webapp; npm run typecheck)
- name: Lint webapp
run: (cd Tokenization/webapp; npm run lint)
ui-test:
needs:
- lint-check-webapp
name: UI-tests for webapp application
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: '22.x'
- name: Generate test Vault certificates for UI docker:test
run: |
bash Tokenization/scripts/actions-certificates-creation.sh
- name: Run webapp UI tests (docker)
run: (cd Tokenization/webapp; npm run docker:test)
central-system-test:
needs:
- lint-check-backend
name: Central System backend tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: '22.x'
- name: Generate test Vault certificates
run: |
bash Tokenization/scripts/actions-certificates-creation.sh
echo "VAULT_ADDR=https://vault.local:9300" >> $GITHUB_ENV
echo "VAULT_AUTH_METHOD=cert" >> $GITHUB_ENV
echo "VAULT_ROLE=central-system" >> $GITHUB_ENV
echo "VAULT_CACERT_B64=$(base64 -w0 Tokenization/docker/vault/ca.crt)" >> $GITHUB_ENV
echo "VAULT_CENTRAL_SYSTEM_CERT_B64=$(base64 -w0 Tokenization/docker/vault/central-system.crt)" >> $GITHUB_ENV
echo "VAULT_CENTRAL_SYSTEM_KEY_B64=$(base64 -w0 Tokenization/docker/vault/central-system.key)" >> $GITHUB_ENV
- name: Install backend dependencies
run: (cd Tokenization/backend/central-system; npm i)
- name: Run all backend tests (unit + Vault integration via docker)
run: (cd Tokenization/backend/central-system; npm run test:all)