Skip to content

bumped actions

bumped actions #340

Workflow file for this run

name: Test
on:
push:
jobs:
test:
name: Test Application
runs-on: ubuntu-latest
env:
POSTGRES_DB: github_actions
DB_NAME: github_actions
services:
postgres:
image: postgis/postgis:12-master
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.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}
- name: GDAL
run: sudo apt-get install postgresql-common libpq-dev python3-gdal
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
pip install https://github.com/diyclassics/latin-spacy-models/blob/main/la_core_cltk_sm/la_core_cltk_sm-0.1.0.tar.gz\?raw\=true
- name: Run collectstatic
run: python manage.py collectstatic
- name: Run migrations
run: python manage.py migrate
- name: Run tests
run: coverage run manage.py test archiv
- name: Create Coverage Report
run: coverage xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: true