forked from ustaxcourt/ef-cms
-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (68 loc) · 2.07 KB
/
client-integration.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
name: Node.js Client Integration Tests
on:
pull_request:
jobs:
client_integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ci_node_total: [12]
ci_node_index: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
env:
CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
CI_NODE_INDEX: ${{ matrix.ci_node_index }}
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: example
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.14.0'
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Setup OpenSearch
uses: ankane/setup-opensearch@v1
with:
opensearch-version: 2.11
- name: Setup DynamoDB Local
uses: rrainn/[email protected]
with:
port: 8000
cors: '*'
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v2
with:
comment_on_pr: false
- name: Install Node Dependencies
run: npm ci
- name: Setup Postgres
run: |
npm run migration:postgres
npm run seed:postgres
- name: Web Client - Integration Tests
run: |
mkdir -p /tmp/web-client
npm run start:api:ci > /tmp/web-client/server-output${{ matrix.ci_node_index }}.txt &
./wait-until-services.sh
export TESTFILES=$(npx ts-node split-tests.ts)
npm run test:client:integration:ci
- name: Store Artifacts
uses: actions/upload-artifact@v4
with:
name: server-log-output-${{ matrix.ci_node_index }}
path: /tmp/web-client/server-output${{ matrix.ci_node_index }}.txt