Skip to content

feat: migrate mysql to postgres #52

feat: migrate mysql to postgres

feat: migrate mysql to postgres #52

Workflow file for this run

name: Test
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [master, release]
pull_request:
env:
# Environments
NODE_ENV: ${{ vars.NODE_ENV }}
DB_HOST: ${{ vars.DB_HOST }}
DB_PORT: ${{ vars.DB_PORT }}
DB_NAME: ${{ vars.DB_NAME }}
DB_USERNAME: ${{ vars.DB_USER }}
DB_PASSWORD: ${{ vars.DB_PASSWORD }}
JWT_SECRET: ${{ vars.JWT_SECRET }}
JWT_EXPIRES_IN: ${{ vars.JWT_EXPIRES_IN }}
ACCESS_TOKEN_SECRET: ${{ vars.ACCESS_TOKEN_SECRET }}
ACCESS_TOKEN_EXPIRES_IN: ${{ vars.ACCESS_TOKEN_EXPIRES_IN }}
REFRESH_TOKEN_SECRET: ${{ vars.REFRESH_TOKEN_SECRET }}
REFRESH_TOKEN_EXPIRES_IN: ${{ vars.REFRESH_TOKEN_EXPIRES_IN }}
CORS_ORIGIN: ${{ vars.CORS_ORIGIN }}
CORS_METHODS: ${{ vars.CORS_METHODS }}
AWS_ACCESS_KEY_ID: ${{ vars.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ vars.AWS_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }}
GOOGLE_CLIENT_ID: ${{ vars.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ vars.GOOGLE_CLIENT_SECRET }}
GOOGLE_CALLBACK_URL: ${{ vars.GOOGLE_CALLBACK_URL }}
FRONTEND_URL: ${{ vars.FRONTEND_URL }}
jobs:
jest:
runs-on: ubuntu-latest
environment: development
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- run: corepack up
- run: pnpm test
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs
path: ~/.npm/_logs
lint:
runs-on: ubuntu-latest
environment: development
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- run: corepack up
- run: pnpm lint
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs
path: ~/.npm/_logs
build:
needs: [jest, lint]
runs-on: ubuntu-latest
environment: production
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- run: corepack up
- run: pnpm build
- name: Archive npm failure logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: npm-logs
path: ~/.npm/_logs