Update login and checkout action #909
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: Testing | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
backend: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Build BE Docker image | |
run: docker build -f backend/Dockerfile -t bvdata-be backend/ --build-arg ENVIRONMENT=dev | |
- name: Run BE Tests | |
run: docker run --network="host" --env DATABASE_HOST=localhost --env SECRET_KEY=nosecret --env [email protected] bvdata-be ./run test | |
frontend-test-prod-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Build prod files | |
run: docker build --target builder -f frontend/Dockerfile -t bvdata-fe frontend/ | |
build-push-images: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}} | |
needs: [backend, frontend-test-prod-build] | |
uses: ./.github/workflows/build-push-images.yml | |
secrets: | |
REACT_APP_MAP_API_URL: ${{ secrets.REACT_APP_MAP_API_URL }} | |
REACT_APP_SENTRY_DSN: ${{ secrets.REACT_APP_SENTRY_DSN }} |