Merge pull request #64 from swoocn/dev #144
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: Map of Pi CI/CD | |
# Controls when the workflow will execute | |
on: | |
# Triggers the workflow on push or pull request events for the "main" and "dev" branch | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# The sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
# Frontend CI/CD Process | |
- name: Install Dependencies for Frontend | |
run: cd frontend && npm install | |
- name: Build Frontend | |
run: cd frontend && npm run build -- --configuration=production | |
- name: Execute Tests for Frontend | |
run: cd frontend && npm run test -- --watch=false --browsers=ChromeHeadless | |
# Backend CI/CD Process | |
- name: Install Dependencies for Backend | |
run: cd backend && npm install | |
- name: Execute Tests for Backend | |
run: cd backend && npm run test |