Skip to content

Merge branch 'develop' of https://github.com/qld-gov-au/ckanext-s3fil… #386

Merge branch 'develop' of https://github.com/qld-gov-au/ckanext-s3fil…

Merge branch 'develop' of https://github.com/qld-gov-au/ckanext-s3fil… #386

Workflow file for this run

name: CI
on:
push:
pull_request:
branches:
- master
jobs:
code_quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
timeout-minutes: 2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
timeout-minutes: 5
- name: Install flake8
run: |
python -m pip install --upgrade pip
pip install flake8
timeout-minutes: 5
- name: Lint with flake8
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-git-org: 'qld-gov-au'
- ckan-version: '2.9'
ckan-git-version: 'qgov-master-2.9.9'
ckan-git-org: 'qld-gov-au'
- 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
fail-fast: false
name: CKAN ${{ matrix.ckan-version }} ${{ matrix.ckan-git-org }} ${{ matrix.ckan-git-version }}
container:
image: ckan/ckan-dev:${{ matrix.ckan-version }}
services:
postgresql:
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
ports:
- 5432:5432
redis:
image: redis
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_SOLR_URL: http://solr:8983/solr/ckan
CKAN_REDIS_URL: redis://redis:6379/1
CKAN_VERSION: ${{ matrix.ckan-version }}
CKAN_GIT_ORG: ${{ matrix.ckan-git-org }}
CKAN_GIT_VERSION: ${{ matrix.ckan-git-version }}
steps:
- uses: actions/checkout@v4
timeout-minutes: 2
- name: Install requirements
continue-on-error: ${{ matrix.experimental }}
run: |
chmod u+x ./scripts/*
./scripts/build.sh
timeout-minutes: 15
- name: Setup CKAN
continue-on-error: ${{ matrix.experimental }}
run: ./scripts/init.sh
timeout-minutes: 15
- name: Run tests
continue-on-error: ${{ matrix.experimental }}
run: ./scripts/test.sh
timeout-minutes: 30
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "/tmp/artifacts/junit/results.xml"
if: always()