Skip to content

Testing main to update code coverage 🧪 #31

Testing main to update code coverage 🧪

Testing main to update code coverage 🧪 #31

Workflow file for this run

name: Update main code coverage
run-name: Testing main to update code coverage 🧪
on:
push:
branches:
- main
workflow_dispatch:
env:
DB_USER: postgres
DB_PASSWORD: secret
DB_PORT: 5432
API_ROUTES_PREFIX: api
TEST_DB_HOST: localhost
TEST_DB_NAME: test_db
jobs:
e2e-tests:
name: E2E tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_PORT: ${{ env.DB_PORT }}
POSTGRES_DB: ${{ env.TEST_DB_NAME }}
POSTGRES_USER: ${{ env.DB_USER }}
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Setup node version
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'yarn'
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run E2E tests
run: yarn test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}