name: CI

on:
  push:
    branches:
      - master
    tags:
      - v0.*
  pull_request:
    branches:
      - master

jobs:
  test:
    name: Run tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build containers and run tests
        run: docker-compose -f docker-compose.yml -f tests/docker-compose.yml run --rm app

  deploy:
    runs-on: ubuntu-latest
    steps:
        - uses: aws-actions/configure-aws-credentials@v1
          with:
            aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
            aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
            aws-region: us-east-1
        - uses: actions/checkout@v2
        - id: deploy
          uses: webfactory/create-aws-codedeploy-deployment@v0.2.1
          with:
            application: la-metro-councilmatic

name: CI

on:
  push:
    branches:
      - master
    tags:
      - v0.*
  pull_request:
    branches:
      - master

jobs:
  test:
    name: Run tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build containers and run tests
        run: docker-compose -f docker-compose.yml -f tests/docker-compose.yml run --rm app

  deploy:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: us-east-1
      - uses: actions/checkout@v2
      - id: deploy
        uses: webfactory/create-aws-codedeploy-deployment@v0.2.1
        with:
          application: la-metro-councilmatic

Make deployment dependent on tests
Make deployment dependent on tests
