Skip to content

Commit

Permalink
first try with test wf
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Dec 19, 2023
1 parent e754276 commit c122288
Show file tree
Hide file tree
Showing 5 changed files with 45,266 additions and 74 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test
on:
push:
jobs:
test:
name: Test Application
runs-on: ubuntu-latest
env:
POSTGRES_DB: github_actions
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: github_actions
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}
- name: Install dependencies
run: |
pip install --upgrade --upgrade-strategy eager -r requirements.txt
- name: Run migrations
run: |
export NEW_PMB=TRUE
python manage.py migrate
unset NEW_PMB
- name: Run tests
run: coverage run manage.py test
- name: Create Coverage Report
run: coverage xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.xml
fail_ci_if_error: false
Loading

0 comments on commit c122288

Please sign in to comment.