This repository has been archived by the owner on Dec 8, 2024. It is now read-only.
Bump mongoose from 8.4.0 to 8.8.3 in /server #85
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: Continuous Integration Workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: 'Run Tests' | |
runs-on: ubuntu-latest | |
env: | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }} | |
RENDER_API_TOKEN: ${{ secrets.RENDER_API_TOKEN }} | |
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} | |
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} | |
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} | |
MONGO_URL_PROD: ${{ secrets.MONGO_URL_PROD }} | |
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }} | |
REFRESH_TOKEN_SECRET: ${{ secrets.REFRESH_TOKEN_SECRET }} | |
TEST_DB: ${{ secrets.TEST_DB }} | |
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }} | |
VITE_APP_EMAIL: ${{ secrets.VITE_APP_EMAIL }} | |
VITE_APP_PASSWORD: ${{ secrets.VITE_APP_PASSWORD }} | |
steps: | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v2 | |
- name: 'Install Node.js' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.11.1 | |
- name: 'Install Dependencies & Test Frontend' | |
working-directory: ./client | |
run: | | |
npm install | |
npm test | |
- name: 'Install Dependencies & Test Backend' | |
working-directory: ./server | |
run: | | |
npm install | |
npm test | |
- name: 'Install wait-on' | |
run: npm install -g wait-on | |
- name: 'Start Backend' | |
run: | | |
cd ./server | |
npm start > server.log 2>&1 & | |
echo "Started backend" | |
- name: 'Start Frontend' | |
run: | | |
cd ./client | |
npm run dev > frontend.log 2>&1 & | |
echo "Started frontend" | |
- name: 'Debug Environment Variables' | |
run: | | |
echo "VITE_APP_EMAIL=$VITE_APP_EMAIL" | |
echo "VITE_APP_PASSWORD=$VITE_APP_PASSWORD" | |
- name: 'Run End-to-End Tests' | |
working-directory: ./client | |
run: | | |
npx cypress run | |
lint: | |
name: 'Run linter & Prettier' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout Repository' | |
uses: actions/checkout@v2 | |
- name: 'Install Node.js' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.11.1 | |
- name: 'Install Frontend Dependencies & Run Linter & Prettier' | |
working-directory: ./client | |
run: | | |
npm install | |
npm run lint:fix | |
npm run format | |
- name: 'Install Backend Dependencies & Run Prettier Format' | |
working-directory: ./server | |
run: | | |
npm install | |
npm run format |