Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,47 @@
name: Tests
on: [push, pull_request]
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.9, "3.10" ]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: pip install flake8 pycodestyle
- name: Check syntax
run: |
flake8 . --count --max-line-length=127 --show-source --statistics

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ckan-version: "ckan-dev:2.9-py3.9"
ckan-postgres-version: "2.9"
ckan-solr-version: "2.9-solr8"
- ckan-version: "ckan-dev:2.10-py3.10"
ckan-postgres-version: "2.10"
ckan-solr-version: "2.10"
- ckan-version: "ckan-dev:2.11-py3.10"
ckan-postgres-version: "2.11"
ckan-solr-version: "2.11-solr9"

container:
# The CKAN version tag of the Solr and Postgres containers should match
# the one of the container the tests run on.
# You can switch this base image with a custom image tailored to your project
image: openknowledge/ckan-dev:2.9
image: ckan/${{ matrix.ckan-version }}
options: --user root
services:
solr:
image: ckan/ckan-solr-dev:2.9
image: ckan/ckan-solr:${{ matrix.ckan-solr-version }}
postgres:
image: ckan/ckan-postgres-dev:2.9
image: ckan/ckan-postgres-dev:${{ matrix.ckan-postgres-version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand All @@ -29,7 +58,7 @@ jobs:
CKAN_REDIS_URL: redis://redis:6379/1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Install requirements
# Install any extra requirements your extension has here (dev requirements, other extensions etc)
run: |
Expand Down
Loading