Monorepo #1320
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: backend | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: backend/node_modules | |
key: ${{ runner.os }}-cache | |
- name: Install dependencies | |
working-directory: ./backend | |
run: yarn | |
- name: Run linter | |
working-directory: ./backend | |
run: yarn lint:check | |
test: | |
runs-on: ubuntu-latest | |
env: | |
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} | |
S3_REGION: ${{ secrets.S3_BUCKET_NAME }} | |
COGNITO_REGION: ${{ secrets.COGNITO_REGION }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
- name: Cache backend dependencies | |
uses: actions/cache@v2 | |
with: | |
path: backend/node_modules | |
key: ${{ runner.os }}-cache | |
- name: Cache frontend dependencies | |
uses: actions/cache@v2 | |
with: | |
path: client/node_modules | |
key: ${{ runner.os }}-cache | |
- name: Install backend dependencies | |
working-directory: ./backend | |
run: yarn | |
- name: Install frontend dependencies | |
working-directory: ./frontend | |
run: yarn | |
- name: Run gulpfile | |
working-directory: ./backend | |
run: yarn gulp | |
- name: Run tests | |
working-directory: ./backend | |
run: yarn test |