Skip to content

Update dependencies for all packages (#221) #73

Update dependencies for all packages (#221)

Update dependencies for all packages (#221) #73

Workflow file for this run

name: Branch build
on:
push:
branches:
- main
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
build-node-apps:
name: Build and test Node.js apps
runs-on: ubuntu-latest
strategy:
matrix:
component:
- core
- cli
services:
mongo:
image: mongo:latest
ports:
- 27017:27017
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: volta-cli/action@v4
- name: Install dependencies
run: npm install && npm run bootstrap
- name: Lint code
run: npm run lint
- name: Build all applications
run: npm run build-all
- name: Run tests with coverage
working-directory: ./${{ matrix.component }}
run: npm run test:coverage
- name: Upload test coverage
uses: codecov/codecov-action@v3
with:
files: ./${{ matrix.component }}/coverage/lcov.info
flags: ${{ matrix.component }}
fail_ci_if_error: true
verbose: true
build-docker-image:
name: Build and test Docker image
runs-on: ubuntu-latest
env:
DB_URI: mongodb://mongo:27017/dockertest
DB_NAME: dockertest
DATA_IMPORT_PATH: docker-image/test/_importdata
services:
mongo:
image: mongo:latest
ports:
- 27017:27017
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build image
run: docker build -f ./docker-image/dev.Dockerfile -t mongo-seeding-dev .
- name: Run image
run: docker run --network=${{ job.services.mongo.network }} -e DB_URI -e DB_NAME -e REPLACE_ID=true -e SET_TIMESTAMPS=true -v $(pwd)/${DATA_IMPORT_PATH}:/data -w /data mongo-seeding-dev
- name: Build Tester image
run: docker build -t tester .
working-directory: ./docker-image/test/tester
- name: Run Tester
run: docker run --network=${{ job.services.mongo.network }} -e DB_URI -e DB_NAME tester