docs: add voting system fyp final report #619
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
## Continuous Integration Workflow | |
name: Build and Deploy | |
on: [push, pull_request] | |
# Target Branch Job | |
jobs: | |
Lint-Build-Test: | |
runs-on: ubuntu-latest | |
steps: | |
# Check Out Repository | |
- uses: actions/checkout@v1 | |
# Install Node.js | |
- uses: actions/[email protected] | |
with: | |
node-version: 16.13.2 | |
- name: Clear npm cache | |
run: npm cache clean --force | |
# Install Node Dependencies | |
- name: Installing NodeJS Dependencies | |
run: npm install | |
# Run Build | |
- name: Build | |
run: npm run build | |
# Run ESLint | |
- name: ESLint Check | |
run: npx eslint . --config .eslintrc.json --ext .js,.jsx,.ts,.tsx | |
# Run Prettier | |
- name: Prettier Check | |
run: npx prettier --check . --config .prettierrc.json | |
# # Run Jest Unit Tests | |
# - name: Unit Tests | |
# run: npx jest | |
# Create .env.local file | |
- name: Create .env.local file | |
run: echo "NEXT_PUBLIC_BASE_DEV_API_URL=http://localhost:4000/api" > .env.local | |
# Run Cypress Component Tests | |
- name: Component Tests | |
uses: cypress-io/github-action@v6 | |
with: | |
component: true | |
# Deploy: | |
# needs: [Lint-Build-Test] | |
# runs-on: ubuntu-latest | |
# steps: | |
# # Re-Initialize Staging Server | |
# - if: github.ref == 'refs/heads/staging' | |
# name: Push Changes to Staging Server [LIVE] | |
# - if: github.ref == 'refs/heads/master' | |
# name: Push Changes to Production Server [LIVE] |