-
Notifications
You must be signed in to change notification settings - Fork 46
97 lines (94 loc) · 2.64 KB
/
build_test.service.yaml
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
name: build and test service
on:
workflow_dispatch:
workflow_call:
push:
paths:
- service/**
- .github/workflows/build_test.service.yaml
- .github/workflows/config.yaml
jobs:
config:
uses: ./.github/workflows/config.yaml
build:
name: build mage service
needs: config
runs-on: ubuntu-latest
steps:
- name: install system libs
run: |
sudo apt-get install build-essential
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: ${{ needs.config.outputs.node_versions-latest }}
cache: npm
cache-dependency-path: |
service/npm-shrinkwrap.json
plugins/nga-msi/package-lock.json
plugins/image/service/package-lock.json
- name: build service
run: |
cd service
npm ci
npm run build
- name: pack service
run: npm pack ./service
- name: build plugin nga-msi
run: |
cd plugins/nga-msi
npm ci
npm run build
npm test
- name: pack nga-msi
run: npm pack ./plugins/nga-msi
- name: build plugin image.service
run: |
cd plugins/image/service
npm ci
npm run build
npm test
- name: pack plugin image.service
run: npm pack ./plugins/image/service
- name: upload packages
uses: actions/upload-artifact@v3
with:
name: mage_service_packages
path: |
ngageoint-mage.*.tgz
test:
name: test mage service
needs: [ config, build ]
runs-on: ubuntu-latest
strategy:
matrix:
node: ${{ fromJSON(needs.config.outputs.node_versions-all-json) }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: |
service/npm-shrinkwrap.json
- name: install service dependencies
run: |
npm ci --prefix service
- name: download service package
uses: actions/download-artifact@v3
with:
name: mage_service_packages
- name: extract service lib
run: |
tar xzf $(ls -1 ngageoint-mage.service-*.tgz) package/lib
mv package/lib ./service
rmdir package
- name: test service with node ${{ matrix.node }}
run: |
cd service
npm run ci:test
# TODO: restore coveralls test coverage report - see buildAndTest.yml