Admin User Details Angular Upgrade #575
Workflow file for this run
This file contains hidden or 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 service | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| pull_request: | |
| paths: | |
| - .github/workflows/build_test.service.yaml | |
| - .github/workflows/config.yaml | |
| - service/** | |
| jobs: | |
| config: | |
| uses: ./.github/workflows/config.yaml | |
| build: | |
| name: build mage service | |
| needs: config | |
| runs-on: ubuntu-22.04 | |
| 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-lts }} | |
| cache: npm | |
| cache-dependency-path: service/npm-shrinkwrap.json | |
| - name: build and test | |
| run: | | |
| cd service | |
| npm ci | |
| npm test | |
| npm ci --production | |
| - name: package | |
| run: npm pack ./service | |
| - name: upload package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mage.service-artifacts | |
| path: | | |
| ngageoint-mage.service-*.tgz | |
| test: | |
| name: test mage service | |
| needs: [config, build] | |
| runs-on: ubuntu-22.04 | |
| 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: | | |
| cd service | |
| npm ci | |
| - name: download service package | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: mage.service-artifacts | |
| - 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 |