Skip to content

feat: Added starred endpoints #57

feat: Added starred endpoints

feat: Added starred endpoints #57

Workflow file for this run

name: Test
on:
pull_request:
branches:
- master
permissions:
checks: write
pull-requests: write
contents: write
jobs:
test:
name: Test
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
# optional (defaults to `postgres`)
POSTGRES_DB: postgres_db
# required
POSTGRES_PASSWORD: postgres_password
# optional (defaults to `5432`)
POSTGRES_PORT: 5432
# optional (defaults to `postgres`)
POSTGRES_USER: postgres_user
ports:
# maps tcp port 5432 on service container to the host
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
BLOB_READ_WRITE_TOKEN: 'vercel_blob_rw_0511953119b0c1167283c7453a088727' # Fake vercel token
DATABASE_URL: 'postgresql://postgres_user:postgres_password@localhost:5432/postgres_db'
DATABASE_URL_NON_POOLING: 'postgresql://postgres_user:postgres_password@localhost:5432/postgres_db'
DATABASE_URL_WITHOUT_SCHEMA: 'postgresql://postgres_user:postgres_password@localhost:5432'
REDIS_URL: 'redis://localhost'
SECRET: '7ZB68E3HZ9HWGe8FzUvNWZcoYD9uuwkp25Y66S6RkszKadFMJCj9ShXL7TBcieG9yoRAsdTKzJcEgQUYbd6dtjXgmZMQhVNKypNeq6yKKLVht7gUtXypaoxgoRjQDHLceCWmJhM6GbwYiyLHmVYA8L9zuJUhYW2atZiv4Fxoc4YqzaCCrSZxzPBT9rFDSCtHsXXDEShMvULSStZvwt26tesWtxEMx5Q43a3s6eHrPJUPgVX3aAZsmYRu3bzCHvRp'
PRIVATE: |
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIB63sfXk5HebxHMAoWavbxtK84sjVucZCNm+5Y3au6mb
-----END PRIVATE KEY-----
PUBLIC: |
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEA/nqSs2DZmox+sRNR9d9XdaO3C2yJABIO5gdJlBcswNI=
-----END PUBLIC KEY-----
steps:
- uses: actions/checkout@v3
- name: Setup Redis server
uses: supercharge/[email protected]
- name: Setup Node - ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Run prisma migrations & generate prisma client
run: npx prisma migrate dev
- name: Lint code
run: npm run lint
- name: Run tests
run: npm run test -- --coverage
- name: Comment coverage report on pull request
if: ${{ github.event_name == 'pull_request' }}
uses: ArtiomTr/jest-coverage-report-action@v2
- name: Generate coverage badge
if: ${{ github.ref == 'refs/heads/master' }}
uses: jaywcjlove/coverage-badges-cli@main
with:
source: coverage/coverage-summary.json
output: coverage/badge.svg
- name: Publish coverage report to GitHub Pages
if: ${{ github.ref == 'refs/heads/master' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: coverage