Skip to content

refactor(gamification): simplify experience calculation and remove re… #21

refactor(gamification): simplify experience calculation and remove re…

refactor(gamification): simplify experience calculation and remove re… #21

Workflow file for this run

name: Run tests
on: push
jobs:
run-ci:
name: Run tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_USER: docker
POSTGRES_PASSWORD: docker
POSTGRES_DB: inorbit_test
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- name: Install Yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Setup .env.test
run: |
echo "DATABASE_URL=postgresql://docker:docker@localhost:5432/inorbit_test" >> .env.test
echo "GITHUB_CLIENT_ID=${{ secrets.GITHUB_CLIENT_ID }}" >> .env.test
echo "GITHUB_CLIENT_SECRET=${{ secrets.GITHUB_CLIENT_SECRET }}" >> .env.test
echo "JWT_SECRET=${{ secrets.JWT_SECRET }}" >> .env.test
- name: Run tests
run: yarn test
- name: Run tests with coverage
run: yarn test:coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage-final.json,./coverage/lcov.info
fail_ci_if_error: true