Skip to content

Merge pull request #187 from open-contracting/pre-commit-ci-update-co… #466

Merge pull request #187 from open-contracting/pre-commit-ci-update-co…

Merge pull request #187 from open-contracting/pre-commit-ci-update-co… #466

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- run: pip install -r requirements.txt
# Check requirements.txt contains production requirements.
- run: ./manage.py --help
- run: pip install -r requirements_dev.txt
# Compile messages, so that lib-cove-web translations are available.
- name: Install gettext
run: |
sudo apt update
sudo apt install gettext
- run: ./manage.py compilemessages
- name: Run checks and tests
env:
# https://github.com/OpenDataServices/lib-cove/issues/112
PYTHONWARNINGS: error,ignore::DeprecationWarning:libcove.lib.common
shell: bash
run: |
./manage.py migrate
./manage.py makemigrations --check --dry-run
./manage.py check --fail-level WARNING
# https://github.com/OpenDataServices/flatten-tool/issues/412
pytest -W error -W ignore::DeprecationWarning:libcove.lib.common -W ignore::ResourceWarning --cov cove_ocds --cov cove_project
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github