-
-
Notifications
You must be signed in to change notification settings - Fork 44
212 lines (172 loc) · 6.17 KB
/
Copy pathtest.yml
File metadata and controls
212 lines (172 loc) · 6.17 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
name: Test
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
permissions:
contents: read
jobs:
events:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 10
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v7
with:
ref: ${{github.event.pull_request.head.sha || github.sha}}
- name: Docker Build Events
run: docker compose build events
- name: Docker Events Lint
run: docker run cloudtak-events:latest npm run lint
- name: Docker Events Check
run: docker run cloudtak-events:latest npm run check
- name: Docker Events Test & Coverage
run: docker run -v ./tasks/events/coverage/:/workspace/tasks/events/coverage cloudtak-events:latest npm run coverage
- name: Docker Folder Permissions
run: docker run -v ./tasks/events/coverage/:/workspace/tasks/events/coverage cloudtak-events:latest chmod -R 777 /workspace/tasks/events/coverage
- name: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./tasks/events/coverage/lcov.info
flags: events
retention:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 10
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v7
with:
ref: ${{github.event.pull_request.head.sha || github.sha}}
- name: Docker Build Retention
run: docker compose build retention
- name: Docker Retention Check
run: docker run cloudtak-retention:latest npm run check
- name: Docker Retention Test & Coverage
run: docker run -v ./tasks/retention/coverage/:/workspace/tasks/retention/coverage cloudtak-retention:latest npm run coverage
- name: Docker Folder Permissions
run: docker run -v ./tasks/retention/coverage/:/workspace/tasks/retention/coverage cloudtak-retention:latest chmod -R 777 /workspace/tasks/retention/coverage
- name: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./tasks/retention/coverage/lcov.info
flags: retention
- name: Docker Retention Run Once
run: docker run cloudtak-retention:latest npm run run-once
pmtiles:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 10
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v7
with:
ref: ${{github.event.pull_request.head.sha || github.sha}}
- uses: actions/setup-node@v7
with:
node-version: 24
registry-url: https://registry.npmjs.org/
- name: Install
working-directory: ./tasks/pmtiles/
run: npm install
- name: Lint
working-directory: ./tasks/pmtiles/
run: npm run lint
- name: Check
working-directory: ./tasks/pmtiles/
run: npm run check
- name: Test & Coverage
working-directory: ./tasks/pmtiles/
run: npm run coverage
- name: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./tasks/pmtiles/coverage/lcov.info
flags: pmtiles
- name: Build
working-directory: ./tasks/pmtiles/
run: npm run build
test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 15
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v7
with:
ref: ${{github.event.pull_request.head.sha || github.sha}}
- name: Docker Compose Build
run: docker compose up --build -d postgis
- name: Docker API Build
run: docker compose build api
- name: Docker API Lint
run: docker run cloudtak-api:latest npm run lint
- name: Docker Test & Coverage
run: docker run --network cloudtak_default -v ./coverage/:/home/etl/api/coverage -e "POSTGRES=postgres://docker:docker@postgis:5432/gis" cloudtak-api:latest npm run coverage
- name: Docker Folder Permissions
run: docker run --network cloudtak_default -v ./coverage/:/home/etl/api/coverage -e "POSTGRES=postgres://docker:docker@postgis:5432/gis" cloudtak-api:latest chmod -R 777 /home/etl/api/coverage
- name: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
flags: api
- name: Docker Cleanup
run: docker compose kill
web:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 15
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v7
with:
ref: ${{github.event.pull_request.head.sha || github.sha}}
- uses: actions/setup-node@v7
with:
node-version: 24
registry-url: https://registry.npmjs.org/
- name: Install
working-directory: ./api/web/
run: npm install
- name: Lint
working-directory: ./api/web/
run: npm run lint
- name: Check
working-directory: ./api/web/
run: npm run check
- name: Build Types
working-directory: ./api/web/
run: npm run build:types
- name: Build TypeDocs
working-directory: ./api/web/
run: npm run doc
- name: Test & Coverage
working-directory: ./api/web/
run: npm run coverage
- name: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./api/web/coverage/lcov.info
flags: web