forked from pinkycollie/deaf-first-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild-test.yaml
More file actions
77 lines (66 loc) · 1.65 KB
/
Copy pathcloudbuild-test.yaml
File metadata and controls
77 lines (66 loc) · 1.65 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
# Cloud Build configuration for PR validation and testing
# This file is used by Cloud Build triggers for the PinkFlow testing container
steps:
# Install dependencies
- name: 'node:20'
id: 'install-dependencies'
entrypoint: 'npm'
args: ['ci']
# Run linting
- name: 'node:20'
id: 'lint'
entrypoint: 'npm'
args: ['run', 'lint']
waitFor: ['install-dependencies']
# Run type checking
- name: 'node:20'
id: 'type-check'
entrypoint: 'npm'
args: ['run', 'type-check']
waitFor: ['install-dependencies']
# Run unit tests
- name: 'node:20'
id: 'test'
entrypoint: 'npm'
args: ['run', 'test']
env:
- 'NODE_ENV=test'
waitFor: ['install-dependencies']
# Build all services
- name: 'node:20'
id: 'build'
entrypoint: 'npm'
args: ['run', 'build']
waitFor: ['lint', 'type-check', 'test']
# Validate API contracts
- name: 'node:20'
id: 'validate-api'
entrypoint: 'npm'
args: ['run', 'test:api']
env:
- 'NODE_ENV=test'
waitFor: ['build']
# Run accessibility tests
- name: 'node:20'
id: 'accessibility-test'
entrypoint: 'npm'
args: ['run', 'test:accessibility']
env:
- 'NODE_ENV=test'
waitFor: ['build']
# Store build artifacts
artifacts:
objects:
location: 'gs://${PROJECT_ID}-test-results'
paths:
- 'test-results/**/*'
- 'coverage/**/*'
# Build timeout
timeout: '1200s'
# Logging options
options:
logging: CLOUD_LOGGING_ONLY
machineType: 'N1_HIGHCPU_8'
# Substitutions
substitutions:
_ENVIRONMENT: 'test'