Skip to content

Commit

Permalink
Merge pull request #128 from qld-gov-au/QOLDEV-1003-ckan-2.11
Browse files Browse the repository at this point in the history
[QOLDEV-1003] fix Solr container versions
  • Loading branch information
ThrawnCA authored Dec 17, 2024
2 parents 0626404 + 1b6b88c commit 00eabb4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 44 deletions.
79 changes: 36 additions & 43 deletions .github/workflows/ci.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,89 +11,82 @@ jobs:
code_quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
timeout-minutes: 2

- name: Setup Python
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
timeout-minutes: 5

- name: Install flake8
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install flake8
timeout-minutes: 5

- name: Lint with flake8
run: |
flake8
- name: Check syntax
run: flake8
timeout-minutes: 5

test:
runs-on: ubuntu-latest
needs: code_quality
strategy:
matrix:
ckan-version: ['2.11', '2.10', '2.9']
experimental: [false]
ckan-git-org: ['ckan']
include:
- ckan-version: '2.9'
ckan-git-version: 'ckan-2.9.9-qgov.4'
- ckan-version: '2.11'
ckan-git-version: 'ckan-2.11.1'
ckan-git-org: 'ckan'
solr-version: 9
experimental: false
- ckan-version: '2.10'
ckan-git-version: 'ckan-2.10.6'
ckan-git-org: 'ckan'
solr-version: 8
experimental: false
- ckan-version: '2.10'
ckan-git-version: 'ckan-2.10.5-qgov.4'
ckan-git-org: 'qld-gov-au'
solr-version: 8
experimental: false
- ckan-version: '2.9'
ckan-git-version: 'qgov-master-2.9.9'
ckan-git-version: 'ckan-2.9.9-qgov.4'
ckan-git-org: 'qld-gov-au'
solr-version: 8
experimental: false
- ckan-version: 'master'
ckan-git-org: 'ckan'
ckan-git-version: 'master'
experimental: true #master is unstable, good to know if we are compatible or not
solr-version: 9
experimental: true # master is unstable, good to know if we are compatible or not

fail-fast: false

name: CKAN ${{ matrix.ckan-version }} ${{ matrix.ckan-git-org }} ${{ matrix.ckan-git-version }}
runs-on: ubuntu-latest
container:
image: ckan/ckan-dev:${{ matrix.ckan-version }}

options: --user root
services:
postgresql:
solr:
image: ckan/ckan-solr:${{ matrix.ckan-version }}-solr${{ matrix.solr-version }}
postgres:
image: ckan/ckan-postgres-dev:${{ matrix.ckan-version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
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
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 6379:6379

moto:
image: motoserver/moto
ports:
- "5000"

solr:
image: ckan/ckan-solr:${{ matrix.ckan-version }}-solr9

env:
CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgresql/ckan_test
CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgresql/datastore_test
CKAN_DATASTORE_READ_URL: postgresql://datastore_read:pass@postgresql/datastore_test
CKAN_SQLALCHEMY_URL: postgresql://ckan_default:pass@postgres/ckan_test
CKAN_DATASTORE_WRITE_URL: postgresql://datastore_write:pass@postgres/datastore_test
CKAN_DATASTORE_READ_URL: postgresql://datastore_read:pass@postgres/datastore_test
CKAN_SOLR_URL: http://solr:8983/solr/ckan
CKAN_REDIS_URL: redis://redis:6379/1
CKAN_VERSION: ${{ matrix.ckan-version }}
Expand All @@ -103,7 +96,7 @@ jobs:

steps:
- uses: actions/checkout@v4
timeout-minutes: 2
timeout-minutes: 1

- name: Install requirements
continue-on-error: ${{ matrix.experimental }}
Expand All @@ -125,5 +118,5 @@ jobs:
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "/tmp/artifacts/junit/results.xml"
paths: "/tmp/junit/results.xml"
if: always()
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

pytest -vv --ckan-ini=test.ini --cov=ckanext.s3filestore --junit-xml=/tmp/artifacts/junit/results.xml
pytest -vv --ckan-ini=test.ini --cov=ckanext.s3filestore --junit-xml=/tmp/junit/results.xml

0 comments on commit 00eabb4

Please sign in to comment.