-
Notifications
You must be signed in to change notification settings - Fork 4
117 lines (98 loc) · 2.81 KB
/
ci.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
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']
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'
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@v3
timeout-minutes: 2
- name: Install requirements
run: |
chmod u+x ./scripts/*
./scripts/build.sh
timeout-minutes: 15
- name: Setup CKAN
run: |
./scripts/init.sh
timeout-minutes: 15
- name: Run tests
run: |
./scripts/test.sh
timeout-minutes: 30