Updated for Docker Compose #72
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- 'feature/**' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y docker-compose | |
- name: Set up Docker Compose | |
run: docker-compose version | |
- name: Build and Run Services | |
run: | | |
docker-compose up -d --build | |
docker-compose exec flask-app pytest ling508/tests --verbose | |
- name: Tear down Docker Compose | |
if: always() | |
run: docker-compose down --volumes |