-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (115 loc) · 3.51 KB
/
cs.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: C#
on:
workflow_dispatch:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-quality: 'preview'
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install npm dependencies
run: npm ci --include=dev
- name: Determine modified files
run: ./utils/init_actions.sh
- name: Pre-transpile (export exchanges and emit API)
run: npm run pre-transpile-cs
- name: Transpile to C#
if: env.important_modified == 'true'
run: npm run transpileCS
- name: Transpile to C# (specific)
if: env.important_modified == 'false'
run: |
cleaned_rest_files=$(echo ${{ env.rest_files }} | tr -s ' ')
for exchange in $cleaned_rest_files; do
npm run transpileCsSingle -- $exchange
done
cleaned_ws_files=$(echo ${{ env.ws_files }} | tr -s ' ')
for exchange in $cleaned_ws_files; do
npm run transpileCsSingle -- --ws $exchange
done
- name: Build Projext
run: npm run buildCS
- name: Run Base Tests
if: env.important_modified == 'true'
run: npm run test-base-rest-cs
- name: Run Base Ws Tests
if: env.important_modified == 'true'
run: npm run test-base-ws-cs
- name: Run Id Tests
if: env.important_modified == 'true'
run: npm run id-tests-cs
- name: Request tests
if: env.important_modified == 'true'
run: npm run request-cs
- name: Request tests (specific)
if: env.important_modified == 'false'
run: |
cleaned_rest_files=$(echo ${{ env.rest_files }} | tr -s ' ')
for exchange in $cleaned_rest_files; do
npm run request-cs -- $exchange
done
- name: Response tests
if: env.important_modified == 'true'
run: npm run response-cs
- name: Response tests (specific)
if: env.important_modified == 'false'
run: |
cleaned_rest_files=$(echo ${{ env.rest_files }} | tr -s ' ')
for exchange in $cleaned_rest_files; do
npm run response-cs -- $exchange
done
- name: Upload shared_env.txt
uses: actions/upload-artifact@v4
with:
name: shared_env
path: shared_env.txt
- name: Upload Python Files
uses: actions/upload-artifact@v4
with:
name: cs-files
path: cs/
live-tests:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download shared_env
uses: actions/download-artifact@v4
with:
name: shared_env
- name: Download Py Files
uses: actions/download-artifact@v4
with:
name: cs-files
path: cs/
- name: Restore shared_env
run: ./utils/restore_shared_env.sh
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install npm dependencies
run: npm ci --include=dev
- name: Export exchanges
run: npm run export-exchanges
- name: Live tests
if: env.important_modified == 'true'
run: ./run-tests-simul.sh --csharp
- name: Live tests (specific)
if: env.important_modified == 'false'
run: ./run-tests-simul.sh --csharp "${{ env.rest_files }}" "${{ env.ws_files }}"