-
Notifications
You must be signed in to change notification settings - Fork 4
122 lines (109 loc) · 3.52 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: CI
on:
push:
pull_request:
branches:
- master
jobs:
code_quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Check syntax
run: flake8
timeout-minutes: 5
test:
needs: code_quality
strategy:
matrix:
include:
- 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: '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'
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:
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
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"
env:
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 }}
CKAN_GIT_ORG: ${{ matrix.ckan-git-org }}
CKAN_GIT_VERSION: ${{ matrix.ckan-git-version }}
steps:
- uses: actions/checkout@v4
timeout-minutes: 1
- 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/junit/results.xml"
if: always()