Fix for deps #62
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: Guardian CI API Tests | |
on: | |
workflow_dispatch: | |
description: 'Manual run' | |
push: | |
branches-ignore: | |
- 'dependabot/**' | |
jobs: | |
buildAndTest: | |
runs-on: ubuntu-latest | |
container: ubuntu | |
# services: | |
# hashicorpvault: | |
# image: vault | |
# env: | |
# VAULT_SERVER: "https://0.0.0.0:8200" | |
# VAULT_DEV_ROOT_TOKEN_ID: "1234" | |
# ports: | |
# - 8200/tcp | |
strategy: | |
matrix: | |
node-version: [ 16.x ] | |
mongodb-version: [ 4.4 ] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
- name: Start NatsMQ | |
uses: onichandame/nats-action@master | |
with: | |
port: "4222" | |
- name: Build | |
run: | | |
yarn | |
pushd interfaces | |
yarn run build | |
popd | |
pushd common | |
yarn run build | |
popd | |
pushd notification-service | |
yarn run build | |
popd | |
pushd logger-service | |
yarn run build | |
popd | |
pushd auth-service | |
yarn run build | |
popd | |
pushd guardian-service | |
yarn run build | |
popd | |
pushd policy-service | |
yarn run build | |
popd | |
pushd worker-service | |
yarn run build | |
popd | |
pushd api-gateway | |
yarn run build | |
popd | |
env: | |
CI: true | |
- name: Run tests | |
run: | | |
pushd api-tests | |
npm install | |
npm run test:ci | |
popd | |
env: | |
CI: true | |
OPERATOR_ID: ${{ secrets.OPERATOR_ID }} | |
OPERATOR_KEY: ${{ secrets.OPERATOR_KEY }} | |
IPFS_STORAGE_API_KEY: ${{ secrets.IPFS_STORAGE_API_KEY }} | |
HASHICORP_HOST: localhost | |
HASHICORP_PORT: ${{ job.services.hashicorpvault.ports[8200] }} | |
- name: Publish API Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: always() | |
with: | |
files: test_results/**/*.xml |