WIP #476
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
name: Test | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Python 3.8 is used by the live cove and datastore servers | |
python-version: [ '3.8'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements_dev.txt') }}-${{ matrix.python-version }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install requirements_cove_dev.txt | |
run: pip install -r requirements_cove_dev.txt | |
- name: Install Ubuntu Translation Libraries | |
run: sudo apt install gettext | |
- name: Test 360 | |
run: cd cove; DJANGO_SETTINGS_MODULE=cove_project.settings py.test -vv -n 2 --cov-append --cov --cov-report= | |
- name: Migrate Database | |
run: DJANGO_SETTINGS_MODULE=cove_project.settings python ./cove/manage.py migrate | |
- name: Compile Messages | |
run: DJANGO_SETTINGS_MODULE=cove_project.settings python ./cove/manage.py compilemessages | |
- name: Install vnu | |
run: cd cove; wget "https://github.com/validator/validator/releases/download/16.3.3/vnu.jar_16.3.3.zip"; unzip vnu.jar_16.3.3.zip | |
- name: VNU tests | |
run: "cd cove; DJANGO_SETTINGS_MODULE=cove_project.settings DEBUG=false ALLOWED_HOSTS=localhost python manage.py runserver & (sleep 10s; java -jar dist/vnu.jar 'http://localhost:8000/' 'http://localhost:8000/?source_url=https://github.com/threesixtygiving/dataquality/raw/master/cove/cove_360/fixtures/fundingproviders_grants_2_grants.csv | |
' 'http://localhost:8000/?source_url=https://github.com/threesixtygiving/dataquality/raw/main/cove/cove_360/fixtures/badfile_all_validation_errors.xlsx | |
' 'http://localhost:8000/?source_url=https://github.com/threesixtygiving/dataquality/raw/main/cove/cove_360/fixtures/badfile_all_validation_errors.json | |
' 'http://localhost:8000/common_errors/' 'http://localhost:8000/additional_checks/')" | |
# - name: Report to coveralls | |
# env: | |
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
#run: coveralls --service=github |