Skip to content

chore: release master #402

chore: release master

chore: release master #402

Workflow file for this run

name: PR - API
on:
pull_request:
branches:
- master
- '!release-please**'
paths:
- 'api/**'
env:
NODE_VERSION: '20'
PNPM_VERSION: 8
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
if: contains(fromJson('["ved-bot", "renovate[bot]"]'), github.actor) == false
services:
postgres:
image: postgres:13.4
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432/tcp
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}
- name: Install packages
run: pnpm install
- name: Init
run: pnpm run init --no-client
env:
DATABASE_URL: 'postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres'
- name: Test and Coverage (PR)
uses: anuraag016/Jest-Coverage-Diff@master
with:
accessToken: '${{ secrets.GH_BOT_TOKEN }}'
runCommand: 'pnpm run --filter ./api coverage'
delta: 100 # Delta of % changed that would make this job fail
total_delta: 100
afterSwitchCommand: 'pnpm i && pnpm run init --no-client'
useSameComment: true
env:
DATABASE_URL: 'postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres'
TEST_DATABASE_URL: 'postgres://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres'
COV_REPORTER: 'json-summary'
COV_DIRECTORY: '../'