Skip to content

Commit

Permalink
chore: Update tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Alschn committed Oct 20, 2024
1 parent 34260d7 commit b9ccd66
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,50 +21,50 @@ jobs:

services:
postgres:
image: postgres:14.0
image: postgres:16.0
env:
POSTGRES_DB: github_actions
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
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:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Python 3.10
uses: actions/setup-python@v2
- name: Setup Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"

- name: Install psycopg prerequisites
run: sudo apt-get install libpq-dev
run: |
sudo apt-get install libpq-dev
- name: Install pipenv
- name: Install poetry
run: |
python -m pip install --upgrade pipenv wheel
python -m pip install --upgrade poetry wheel
- id: cache-pipenv
uses: actions/cache@v1
- id: cache-poetry
uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
pipenv sync --dev --python 3.10 --verbose
poetry install
- name: Django tests
run: |
pipenv run coverage run manage.py test
poetry run coverage run manage.py test
- name: Code coverage
run: |
pipenv run coverage report -m
poetry run coverage report -m
test-frontend:
runs-on: ubuntu-latest
Expand Down

0 comments on commit b9ccd66

Please sign in to comment.