configure eslint for client #5
Workflow file for this run
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: Client CI/CD | |
on: | |
push: | |
branches: [ '**' ] | |
paths: | |
- 'client/**' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'client/**' | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
working-directory: ./client | |
run: npm install | |
- name: Lint | |
working-directory: ./client | |
run: npm run lint | |
# Make sure you have a lint script in your package.json | |
- name: Run tests | |
working-directory: ./client | |
run: npm test | |
# This assumes you have a test script in your package.json | |
- name: Build | |
working-directory: ./client | |
run: npm run build | |
# Builds your application, make sure you have a build script in your package.json | |
deploy: | |
needs: build_and_test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
- name: Vercel Deploy | |
uses: amondnet/vercel-action@v20 | |
with: | |
vercel_token: ${{ secrets.VERCEL_TOKEN }} | |
project_name: "group-project-team-7" | |
org_id: ${{ secrets.VERCEL_ORG_ID }} | |
project_id: ${{ secrets.VERCEL_PROJECT_ID }} |