[QOLSVC-3186] make Flake8 happy #105
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
--- | |
#based on https://raw.githubusercontent.com/ckan/ckanext-scheming/master/.github/workflows/test.yml | |
# alternative https://github.com/ckan/ckan/blob/master/contrib/cookiecutter/ckan_extension/%7B%7Bcookiecutter.project%7D%7D/.github/workflows/test.yml | |
name: Tests | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install requirements | |
run: pip install flake8 pycodestyle | |
- name: Check syntax | |
run: flake8 . --count --show-source --statistics | |
test: | |
needs: lint | |
strategy: | |
matrix: | |
ckan-version: ["2.10", 2.9, 2.9-py2, 2.8] | |
fail-fast: true | |
name: CKAN ${{ matrix.ckan-version }} | |
runs-on: ubuntu-latest | |
container: | |
image: openknowledge/ckan-dev:${{ matrix.ckan-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
pip install -e . | |
- name: Run all tests | |
run: | | |
PYTHON=`which python3 || which python` | |
$PYTHON ckanext/csrf_filter/test_anti_csrf.py | |