update the ci to include docker-compose #21
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 ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.10', '3.11'] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Start containers | |
run: docker-compose -f "docker-compose.yaml" up -d --build | |
- name: Run flake8 linting | |
run: docker-compose exec -T app-service flake8 --max-line-length=120 mentor_mingle | |
- name: Run Tests | |
run: docker-compose exec -T app-service pytest |