Skip to content

Update main.yml

Update main.yml #249

Workflow file for this run

name: build ⚙️
on: [push, pull_request]
jobs:
main:
runs-on: ubuntu-20.04
env:
WDR_LOGGING_LOGLEVEL: ERROR
WDR_LOGGING_LOGFILE: /tmp/woudc-data-registry.log
WDR_DB_DEBUG: False
WDR_DB_TYPE: postgresql
WDR_DB_HOST: localhost
WDR_DB_PORT: 5432
WDR_DB_NAME: woudc-data-registry
WDR_DB_USERNAME: postgres
WDR_DB_PASSWORD: postgres
PGPASSWORD: postgres
WDR_SEARCH_TYPE: elasticsearch
WDR_SEARCH_URL: http://localhost:9200/
WDR_WAF_BASEURL: https://woudc.org/archive/
WDR_WAF_BASEDIR: /tmp
WDR_ERROR_CONFIG: woudc_data_registry/tests/config/errors.csv
WDR_ALIAS_CONFIG: data/aliases.yml
WDR_EXTRA_CONFIG: data/extra-options.yml
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
name: Setup Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies 📦
run: sudo apt-get install -y dh-python devscripts fakeroot debhelper python3-all python3-setuptools
- name: Ensure Python 3.8 is Installed
run: sudo apt-get install -y python3.8 python3.8-dev python3.8-venv
- name: Install Debian Build Dependencies
run: sudo apt-get update && sudo apt-get build-dep -y .
- name: Install woudc-extcsv requirement 📦
run: |
git clone https://github.com/woudc/woudc-extcsv.git
cd woudc-extcsv
pip install -r requirements.txt
python3 setup.py install
cd ..
- name: Install requirements 📦
run: |
pip install -r requirements-dev.txt
pip install -r requirements-pg.txt
pip install -r requirements-docs.txt
pip install coveralls
- name: Install package 📦
run: python3 setup.py install
- name: Run tests ⚙️
run: python3 setup.py test
- name: Run flake8
run: find . -type f -name "*.py" | xargs flake8
- name: Build docs
run: cd docs && make html && cd ..
- name: Test coverage ⚙️
continue-on-error: true
run: |
coverage run -a --source=woudc_data_registry -m unittest woudc_data_registry.tests.test_data_registry
coverage run -a --source=woudc_data_registry -m unittest woudc_data_registry.tests.test_report_generation
coverage report -m
coveralls --service=github
- name: Build Python package 🏗️
run: python3 setup.py bdist_wheel --universal
- name: Build Debian package 🏗️
run: sudo debuild -b -uc -us