Skip to content

Commit

Permalink
Merge pull request #74 from unb-mds/fix/test
Browse files Browse the repository at this point in the history
git(workflows): add postgres to test action
  • Loading branch information
mateusvrs authored Nov 6, 2023
2 parents 29aceb5 + 819b550 commit d23a206
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,22 @@ permissions:
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.11"]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Config environment
run: make
run: make config

- name: Start Docker Compose
run: docker compose up --build -d api

- name: Run Tests
run: |
cd api && coverage run manage.py test --settings=core.settings.dev && coverage report && coverage xml
docker exec django-api coverage run manage.py test
docker exec django-api coverage report
docker exec django-api coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
Expand All @@ -45,3 +36,7 @@ jobs:
files: ./api/coverage.xml
directory: ./api/coverage/reports/
fail_ci_if_error: true

- name: Stop Docker Compose
run: docker compose down -v

0 comments on commit d23a206

Please sign in to comment.