feat: migrate mysql to postgres #35
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: 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@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: corepack enable | |
- run: corepack up | |
- run: yarn global add lerna | |
- run: lerna bootstrap | |
- run: lerna run 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@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: echo $ACCESS_TOKEN_SECRET | |
- run: yarn global add lerna | |
- run: lerna bootstrap | |
- run: lerna run 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@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn global add lerna | |
- run: lerna bootstrap | |
- run: lerna run build | |
- name: Archive npm failure logs | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: npm-logs | |
path: ~/.npm/_logs |