Skip to content

Update extension

Update extension #26

Workflow file for this run

name: CI
on:
push:
branches: main
tags:
- 'v*'
pull_request:
branches: main
jobs:
code_quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install flake8
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
run: |
flake8 . --count --max-complexity=12 --max-line-length=127 --statistics --exclude ckan,ckanext-saml2auth
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
ckan-version: ["2.10"]
name: Python ${{ matrix.python-version }} extension test
services:
postgresql:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
ckan-solr:
image: ckan/ckan-solr:2.10
ports:
- 8983:8983
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install pytest
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Setup CKAN
env:
PGPASSWORD: postgres
run: |
export CKANVERSION=${{matrix.ckan-version}}
bash bin/setup-ckan.bash
- name: Test with pytest
run: |
echo "Running SAML2AUTH tests"
pytest --ckan-ini=subdir/test.ini --cov=ckanext.saml2auth --disable-warnings ckanext/saml2auth/tests