fixing deploy script #12
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: Pull Request | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
unit-test-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
cd backend | |
npm install | |
- name: Run tests | |
run: | | |
cd backend | |
npm run unit-test | |
integration-test-backend: | |
runs-on: ubuntu-latest | |
services: | |
dynamodb: | |
image: amazon/dynamodb-local | |
ports: | |
- 8000:8000 | |
steps: | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_SECRET_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
cd backend | |
npm install | |
- name: Create local database tables | |
run: | | |
cd backend | |
npm run create-local-ddb-tables | |
- name: Run tests | |
run: | | |
cd backend | |
npm run integration-test | |
test-frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
cd frontend | |
npm install | |
- name: Run tests | |
run: | | |
cd frontend | |
npm run test |