Skip to content

Updates CI, adds pyproject.toml #146

Updates CI, adds pyproject.toml

Updates CI, adds pyproject.toml #146

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: Install requirements
run: |
pip install -r requirements.txt
- name: Install QGIS
run: sudo apt update && sudo apt install -y qgis
# - name: Log in to the Container registry
# uses: docker/login-action@v3
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push test image
# uses: docker/build-push-action@v3
# with:
# context: .
# push: true
# tags: ghcr.io/opengisch/opencomptage/qgis_test:latest
# cache-from: type=gha
# cache-to: type=gha,mode=max
- name: Start docker stack
run: docker-compose up --build -d
- name: Wait a little bit
run: sleep 5
- name: Running migrations
run: python manage.py migrate
- name: Running tests
run: |
python manage.py test comptages.test -v2
- name: Setting up build tools
run: pip install qgis-plugin-ci
- name: Trying to build / package
run: qgis-plugin-ci package 'test'