Skip to content

feat: enable auto sync with parent site (#163) #208

feat: enable auto sync with parent site (#163)

feat: enable auto sync with parent site (#163) #208

Workflow file for this run

name: Build
on: push
jobs:
build:
name: Build
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
services:
postgres:
image: postgres:11
env:
POSTGRES_DB: kiosc
POSTGRES_USER: kiosc
POSTGRES_PASSWORD: kiosc
options: >-
--health-cmd "pg_isready -U kiosc"
--health-interval 10s
--health-timeout 5s
--health-retries 10
ports:
- 5432:5432
env:
POSTGRES_HOST: 0.0.0.0
POSTGRES_PORT: 5432
DATABASE_URL: 'postgres://kiosc:[email protected]/kiosc'
steps:
- name: Install server dependencies
run: |
sudo apt-get update
sudo apt-get install -qq build-essential zlib1g-dev libtiff5-dev libjpeg8-dev libfreetype6-dev
sudo apt-get install -qq liblcms2-dev libwebp-dev libpq-dev graphviz-dev
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Install project Python dependencies
run: |
pip install wheel==0.37.1
pip install -r requirements/local.txt
pip install -r requirements/test.txt
- name: Download icons
run: python manage.py geticons
- name: Run collectstatic
run: python manage.py collectstatic --noinput
- name: Run tests
run: |
coverage run --rcfile=.coveragerc manage.py test -v 2 --settings=config.settings.test
coverage xml
coverage report
- name: Check linting
run: flake8 .
- name: Check formatting
run: make black arg=--check
- name: Run Codacy coverage reporter
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml
if: ${{ matrix.python-version == '3.8' }}