refactor(gamification): simplify experience calculation and remove re⦠#21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |