Skip to content

mrc-6089 Add coverage #39

mrc-6089 Add coverage

mrc-6089 Add coverage #39

Workflow file for this run

name: test-and-push,
on:
push:
branches:
- main
pull_request:
branches:
- '*'
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
test-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install dependencies
run: npm ci
- name: Login to GHCR (GitHub Packages)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image
run: ./docker/build
- name: Push SHA docker image
run: ./docker/push
- name: Run app in docker
run: ./docker/run
- name: Run unit and integration tests with coverage
run: npm run coverage
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # optional (default = false)
files: ./coverage/coverage-final.json
token: ${{ secrets.CODECOV_TOKEN }} # required
- name: Push branch docker tag
run: ./docker/push_branch_tag