Merge pull request #177 from ngageoint/merge.master-6.2.9-develop #209
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: build and test web-app | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
paths: | |
- web-app/** | |
- .github/workflows/build_test.web-app.yaml | |
- .github/workflows/config.yaml | |
jobs: | |
config: | |
uses: ./.github/workflows/config.yaml | |
main: | |
name: build mage web app | |
needs: config | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
# TODO: angular 9 build does not run on node > 14 | |
node-version: ${{ needs.config.outputs.node_versions-latest }} | |
cache: npm | |
cache-dependency-path: web-app/package-lock.json | |
- name: build | |
run: | | |
cd web-app | |
npm ci | |
npm run build:prod | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
- name: test | |
run: npm run --prefix web-app ci:test | |
- name: pack | |
run: | | |
npm pack ./web-app/dist/core-lib | |
npm pack ./web-app/dist/app | |
- name: upload packages | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mage_web-app_packages | |
path: | | |
ngageoint-mage.*.tgz |