feat: Add endpoints for measurement value and company subscription #420
Workflow file for this run
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: CI | |
permissions: write-all | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.comment.body }} | |
cancel-in-progress: true | |
jobs: | |
pre-commit-checks: | |
name: Pre-commit Checks | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: micromamba installation | |
uses: mamba-org/setup-micromamba@db1df3ba9e07ea86f759e98b575c002747e9e757 | |
- name: add micromamba to GITHUB_PATH | |
run: echo "${HOME}/micromamba-bin" >> "$GITHUB_PATH" | |
- name: pnpm installation | |
uses: pnpm/action-setup@v2.4.0 | |
with: | |
version: 8 | |
- name: Set up node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: dependency installation | |
run: pnpm install --frozen-lockfile | |
- name: Run pre-commit checks | |
uses: pre-commit/action@v3.0.0 | |
env: | |
PRE_COMMIT_USE_MICROMAMBA: 1 | |
ci: | |
name: CI | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
services: | |
postgres-db: | |
image: postgres:16-alpine | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_USER: parma-prod-db | |
POSTGRES_PASSWORD: parma-prod-db | |
POSTGRES_DB: parma-prod-db | |
env: | |
POSTGRES_URL: "postgresql://parma-prod-db:parma-prod-db@localhost:5432/parma-prod-db" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.RH_PAT_FOR_PUSHING }} | |
- uses: pnpm/action-setup@v2.4.0 | |
with: | |
version: 8 | |
- name: node.js setup | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: dependency installation | |
run: pnpm install --frozen-lockfile | |
- name: Db model generation | |
run: pnpx prisma generate | |
- name: Run migrations | |
run: pnpx prisma migrate dev | |
- name: Run CI tests | |
run: pnpm run test:ci | |
env: | |
POSTGRES_HOST: localhost | |
POSTGRES_PORT: 5432 | |
POSTGRES_USER: parma-prod-db | |
POSTGRES_PASSWORD: parma-prod-db | |
POSTGRES_DB: parma-prod-db | |
FIREBASE_ADMINSDK_CERTIFICATE: ${{ secrets.STAGING_FIREBASE_ADMINSDK_CERTIFICATE}} | |
- name: Update badges | |
run: pnpm run make-badges | |
- name: Commit changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Actions" | |
git add . | |
git diff-index --quiet HEAD || git commit -m "Update code cov badges" | |
- name: Push changes | |
run: git push |