Update Github Actions #118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test and package arcgis service plugin | |
on: | |
workflow_dispatch: | |
workflow_call: | |
pull_request: | |
paths: | |
- .github/workflows/build_test.arcgis.service.yaml | |
- .github/workflows/config.yaml | |
- plugins/arcgis/service/** | |
jobs: | |
config: | |
uses: ./.github/workflows/config.yaml | |
test: | |
name: test plugin arcgis.service | |
needs: [config] | |
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: | | |
plugins/arcgis/service/package-lock.json | |
- name: build mage service | |
run: | | |
cd service | |
npm ci | |
npm run build | |
- name: test with node ${{ matrix.node }} | |
run: | | |
cd plugins/arcgis/service | |
npm ci | |
npm link ../../../service | |
npm test | |
package: | |
name: package plugin arcgis.service | |
needs: [config, test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ needs.config.outputs.node_versions-lts }} | |
cache: npm | |
cache-dependency-path: | | |
plugins/arcgis/service/package-lock.json | |
- name: build mage service | |
run: | | |
cd service | |
npm ci | |
npm run build | |
- name: build service for plugin | |
run: | | |
cd plugins/arcgis/service | |
npm ci | |
npm link ../../../service | |
npm run build | |
- name: package for plugin | |
run: npm pack ./plugins/arcgis/service | |
- name: upload package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: arcgis.service-artifacts | |
path: | | |
ngageoint-mage.*.tgz |