Skip to content

Commit cec08a8

Browse files
authored
Update Github Actions (#246)
Fix issues to the Github Actions tests so that they can be used for pr testing.
1 parent cb56e63 commit cec08a8

20 files changed

+18102
-19784
lines changed

.github/workflows/build_test.arcgis.service.yaml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@ name: test and package arcgis service plugin
33
on:
44
workflow_dispatch:
55
workflow_call:
6-
push:
6+
pull_request:
77
paths:
88
- .github/workflows/build_test.arcgis.service.yaml
99
- .github/workflows/config.yaml
1010
- plugins/arcgis/service/**
1111

1212
jobs:
13-
1413
config:
1514
uses: ./.github/workflows/config.yaml
1615

1716
test:
1817
name: test plugin arcgis.service
19-
needs: [ config ]
18+
needs: [config]
2019
runs-on: ubuntu-latest
2120
strategy:
2221
matrix:
@@ -31,15 +30,21 @@ jobs:
3130
cache: npm
3231
cache-dependency-path: |
3332
plugins/arcgis/service/package-lock.json
33+
- name: build mage service
34+
run: |
35+
cd service
36+
npm ci
37+
npm run build
3438
- name: test with node ${{ matrix.node }}
3539
run: |
3640
cd plugins/arcgis/service
37-
npm ci
41+
npm ci --force
42+
npm link ../../../service
3843
npm test
3944
4045
package:
4146
name: package plugin arcgis.service
42-
needs: [ config, test ]
47+
needs: [config, test]
4348
runs-on: ubuntu-latest
4449
steps:
4550
- name: checkout
@@ -51,15 +56,21 @@ jobs:
5156
cache: npm
5257
cache-dependency-path: |
5358
plugins/arcgis/service/package-lock.json
54-
- name: build
59+
- name: build mage service
5560
run: |
56-
cd plugins/arcgis/service
61+
cd service
5762
npm ci
5863
npm run build
59-
- name: pack
64+
- name: build service for plugin
65+
run: |
66+
cd plugins/arcgis/service
67+
npm ci --force
68+
npm link ../../../service
69+
npm run build
70+
- name: package for plugin
6071
run: npm pack ./plugins/arcgis/service
6172
- name: upload package
62-
uses: actions/upload-artifact@v3
73+
uses: actions/upload-artifact@v4
6374
with:
6475
name: arcgis.service-artifacts
6576
path: |

.github/workflows/build_test.arcgis.web-app.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ name: test and package arcgis web plugin
33
on:
44
workflow_dispatch:
55
workflow_call:
6-
push:
6+
pull_request:
77
paths:
88
- .github/workflows/build_test.arcgis.web-app.yaml
99
- .github/workflows/config.yaml
1010
- plugins/arcgis/web-app/**
1111

1212
jobs:
13-
1413
config:
1514
uses: ./.github/workflows/config.yaml
1615

@@ -42,9 +41,8 @@ jobs:
4241
run: |
4342
npm pack ./plugins/arcgis/web-app/dist/main
4443
- name: upload packages
45-
uses: actions/upload-artifact@v3
44+
uses: actions/upload-artifact@v4
4645
with:
4746
name: arcgis.web-app-artifacts
4847
path: |
4948
ngageoint-mage.arcgis.web-app-*.tgz
50-

.github/workflows/build_test.image.service.yaml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@ name: test and package image service plugin
33
on:
44
workflow_dispatch:
55
workflow_call:
6-
push:
6+
pull_request:
77
paths:
88
- .github/workflows/build_test.image.service.yaml
99
- .github/workflows/config.yaml
1010
- plugins/image/service/**
1111

1212
jobs:
13-
1413
config:
1514
uses: ./.github/workflows/config.yaml
1615

1716
test:
1817
name: test plugin image.service
19-
needs: [ config ]
18+
needs: [config]
2019
runs-on: ubuntu-latest
2120
strategy:
2221
matrix:
@@ -31,15 +30,22 @@ jobs:
3130
cache: npm
3231
cache-dependency-path: |
3332
plugins/image/service/package-lock.json
33+
- name: build mage service
34+
run: |
35+
cd service
36+
npm ci --force
37+
npm run build
3438
- name: test with node ${{ matrix.node }}
3539
run: |
3640
cd plugins/image/service
37-
npm ci
41+
npm ci --force
42+
npm install --os=linux --cpu=x64 sharp
43+
npm link ../../../service
3844
npm test
3945
4046
package:
4147
name: package plugin image.service
42-
needs: [ config, test ]
48+
needs: [config, test]
4349
runs-on: ubuntu-latest
4450
steps:
4551
- name: checkout
@@ -51,15 +57,22 @@ jobs:
5157
cache: npm
5258
cache-dependency-path: |
5359
plugins/image/service/package-lock.json
54-
- name: build
60+
- name: build mage service
5561
run: |
56-
cd plugins/image/service
62+
cd service
5763
npm ci
5864
npm run build
65+
- name: build image service
66+
run: |
67+
cd plugins/image/service
68+
npm ci --force
69+
npm install --os=linux --cpu=x64 sharp
70+
npm link ../../../service
71+
npm run build
5972
- name: pack
6073
run: npm pack ./plugins/image/service
6174
- name: upload package
62-
uses: actions/upload-artifact@v3
75+
uses: actions/upload-artifact@v4
6376
with:
6477
name: image.service-artifacts
6578
path: |

.github/workflows/build_test.nga-msi.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@ name: test and package nga-msi plugin
33
on:
44
workflow_dispatch:
55
workflow_call:
6-
push:
6+
pull_request:
77
paths:
88
- .github/workflows/build_test.nga-msi.yaml
99
- .github/workflows/config.yaml
1010
- plugins/nga-msi/**
1111

1212
jobs:
13-
1413
config:
1514
uses: ./.github/workflows/config.yaml
1615

1716
test:
1817
name: test plugin nga-msi
19-
needs: [ config ]
18+
needs: [config]
2019
runs-on: ubuntu-latest
2120
strategy:
2221
matrix:
@@ -31,15 +30,21 @@ jobs:
3130
cache: npm
3231
cache-dependency-path: |
3332
plugins/nga-msi/package-lock.json
33+
- name: build mage service
34+
run: |
35+
cd service
36+
npm ci
37+
npm run build
3438
- name: test with node ${{ matrix.node }}
3539
run: |
3640
cd plugins/nga-msi
3741
npm ci
42+
npm link ../../service
3843
npm test
3944
4045
package:
4146
name: package plugin nga-msi
42-
needs: [ config, test ]
47+
needs: [config, test]
4348
runs-on: ubuntu-latest
4449
steps:
4550
- name: checkout
@@ -51,16 +56,22 @@ jobs:
5156
cache: npm
5257
cache-dependency-path: |
5358
plugins/nga-msi/package-lock.json
59+
- name: build mage service
60+
run: |
61+
cd service
62+
npm ci
63+
npm run build
5464
- name: build
5565
run: |
5666
cd plugins/nga-msi
5767
npm ci
68+
npm link ../../service
5869
npm run build
5970
- name: pack
6071
run: npm pack ./plugins/nga-msi
6172
- name: upload package
62-
uses: actions/upload-artifact@v3
73+
uses: actions/upload-artifact@v4
6374
with:
6475
name: nga-msi-artifacts
6576
path: |
66-
ngageoint-mage.*.tgz
77+
ngageoint-mage.*.tgz

.github/workflows/build_test.service.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: build and test service
33
on:
44
workflow_dispatch:
55
workflow_call:
6-
push:
6+
pull_request:
77
paths:
88
- .github/workflows/build_test.service.yaml
99
- .github/workflows/config.yaml
@@ -15,7 +15,7 @@ jobs:
1515
build:
1616
name: build mage service
1717
needs: config
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-22.04
1919
steps:
2020
- name: install system libs
2121
run: |
@@ -32,20 +32,23 @@ jobs:
3232
run: |
3333
cd service
3434
npm ci
35-
npm run build
35+
- name: run tests
36+
run: |
37+
cd service
38+
npm test
3639
- name: package
3740
run: npm pack ./service
3841
- name: upload package
39-
uses: actions/upload-artifact@v3
42+
uses: actions/upload-artifact@v4
4043
with:
4144
name: mage.service-artifacts
4245
path: |
4346
ngageoint-mage.service-*.tgz
4447
4548
test:
4649
name: test mage service
47-
needs: [ config, build ]
48-
runs-on: ubuntu-latest
50+
needs: [config, build]
51+
runs-on: ubuntu-22.04
4952
strategy:
5053
matrix:
5154
node: ${{ fromJSON(needs.config.outputs.node_versions-all-json) }}
@@ -62,9 +65,9 @@ jobs:
6265
- name: install service dependencies
6366
run: |
6467
cd service
65-
npm ci service
68+
npm ci
6669
- name: download service package
67-
uses: actions/download-artifact@v3
70+
uses: actions/download-artifact@v4
6871
with:
6972
name: mage.service-artifacts
7073
- name: extract service lib
@@ -76,4 +79,4 @@ jobs:
7679
run: |
7780
cd service
7881
npm run ci:test
79-
# TODO: restore coveralls test coverage report - see buildAndTest.yml
82+
# TODO: restore coveralls test coverage report - see buildAndTest.yml

.github/workflows/build_test.web-app.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: build and test web-app
33
on:
44
workflow_dispatch:
55
workflow_call:
6-
push:
6+
pull_request:
77
paths:
88
- .github/workflows/build_test.web-app.yaml
99
- .github/workflows/config.yaml
@@ -41,8 +41,8 @@ jobs:
4141
npm pack ./web-app/dist/core-lib
4242
npm pack ./web-app/dist
4343
- name: upload packages
44-
uses: actions/upload-artifact@v3
44+
uses: actions/upload-artifact@v4
4545
with:
4646
name: mage.web-app-artifacts
4747
path: |
48-
ngageoint-mage.*.tgz
48+
ngageoint-mage.*.tgz

.github/workflows/release.arcgis_plugin.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ on:
1717
# release:
1818

1919
jobs:
20-
2120
config:
2221
uses: ./.github/workflows/config.yaml
2322

2423
check_release_version:
25-
needs: [ config ]
24+
needs: [config]
2625
runs-on: ubuntu-latest
2726
steps:
2827
- name: checkout
@@ -41,16 +40,16 @@ jobs:
4140
[[ $(json version < ./plugins/arcgis/web-app/package.json) = ${{ inputs.version }} ]] || exit 1
4241
4342
build_and_test-service:
44-
needs: [ check_release_version ]
43+
needs: [check_release_version]
4544
uses: ./.github/workflows/build_test.arcgis.service.yaml
4645

4746
build_and_test-web-app:
48-
needs: [ check_release_version ]
47+
needs: [check_release_version]
4948
uses: ./.github/workflows/build_test.arcgis.web-app.yaml
5049

5150
publish_packages:
52-
name: publish packages
53-
needs: [ config, build_and_test-service ]
51+
name: publish packages
52+
needs: [config, build_and_test-service]
5453
runs-on: ubuntu-latest
5554
steps:
5655
- name: setup node
@@ -60,11 +59,11 @@ jobs:
6059
- name: install json util
6160
run: npm i -g json
6261
- name: download service packages
63-
uses: actions/download-artifact@v3
62+
uses: actions/download-artifact@v4
6463
with:
6564
name: arcgis.service-artifacts
6665
- name: download web-app packages
67-
uses: actions/download-artifact@v3
66+
uses: actions/download-artifact@v4
6867
with:
6968
name: arcgis.web-app-artifacts
7069
- name: publish to package registry

0 commit comments

Comments
 (0)