Skip to content

refactor(service): users/auth: remove unnecessary express session mid… #429

refactor(service): users/auth: remove unnecessary express session mid…

refactor(service): users/auth: remove unnecessary express session mid… #429

name: build and test service
on:
workflow_dispatch:
workflow_call:
push:
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-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-lts }}
cache: npm
cache-dependency-path: service/npm-shrinkwrap.json
- name: build
run: |
cd service
npm ci
npm run build
- name: package
run: npm pack ./service
- name: upload package
uses: actions/upload-artifact@v3
with:
name: mage.service-artifacts
path: |
ngageoint-mage.service-*.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: |
cd service
npm ci service
- name: download service package
uses: actions/download-artifact@v3
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