Improve cache keys #188
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8'] | |
steps: | |
- 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 flake8 | |
- name: Lint with flake8 | |
run: | | |
flake8 geostore test_geostore | |
build: | |
runs-on: ubuntu-20.04 | |
#TODO: Fix when github action do not show failed for the workflow with continue-on-error | |
#continue-on-error: ${{ matrix.experimental }} | |
needs: [lint] | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.10'] | |
django-version: ['3.2.*', '4.2.*'] | |
postgis-image: ['postgis/postgis:12-2.5'] | |
services: | |
postgres: | |
image: ${{ matrix.postgis-image }} | |
env: | |
POSTGRES_PASSWORD: travis_ci_test | |
POSTGRES_USER: travis_ci_test | |
POSTGRES_DB: travis_ci_test | |
ports: | |
- 5432:5432 | |
steps: | |
- 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: | | |
sudo apt update && sudo apt-get -yq install libproj-dev binutils gdal-bin libgdal-dev | |
python -m pip install --upgrade pip setuptools wheel | |
pip install .[dev] -U | |
if [[ ${{ matrix.django-version }} == dev ]]; then | |
pip install -e git+https://github.com/django/django@main#egg=django; | |
else | |
pip install Django==${{ matrix.django-version }} -U; | |
fi | |
- name: Check missing migrations | |
run: | | |
./manage.py makemigrations --check | |
- name: Test with coverage | |
run: | | |
coverage run ./manage.py test | |
coverage run -a ./manage.py test --settings=test_geostore.settings_with_customs geostore.tests.test_views.test_vector_tiles.VectorTilesTestCase.test_layer_tilejson_with_custom_hostnames | |
coverage run -a ./manage.py test --settings=test_geostore.settings_with_customs geostore.tests.test_custom_classes | |
coverage run -a ./manage.py test --settings=test_geostore.settings_with_customs geostore.tests.test_views.test_async_exports | |
coverage xml -o coverage.xml | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |
fail_ci_if_error: true |