-
Notifications
You must be signed in to change notification settings - Fork 13
103 lines (86 loc) · 2.47 KB
/
dev-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
name: Dev-Test
on:
push:
branches:
- develop
pull_request:
branches:
- develop
env:
DATABASE_URL: postgres://user:password@localhost:5432/readux
DJANGO_ENV: test
jobs:
pytest:
runs-on: ubuntu-22.04
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.2
env:
STACK_VERSION: 7.17.1
xpack.security.enabled: false
cluster.name: readux-elasticsearch
http.port: 9200
discovery.type: single-node
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
ports:
- 9200:9200
postgres:
image: postgres:10
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: user
POSTGRES_DB: readux_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7.2'
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.12'
- name: Install system requirements
run: |
sudo apt update
sudo apt install -y libjpeg-dev libopenjp2-7-dev libopenjp2-tools libssl-dev postgresql-client ruby-full openssh-server
- name: Install Ruby dependencies
run: |
sudo gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
bundle install
sudo gem install sass
- name: Install Python dependencies
run: |
mkdir logs && touch logs/debug.log
cp config/settings/local.dst config/settings/local.py
pip install --upgrade pip
pip install pyld==1.0.5
pip install -r requirements/local.txt
- name: Test IIIF
run: pytest apps/iiif/
- name: Test Ingest
run: pytest apps/ingest/
- name: Test Readux
run: pytest apps/readux/
- name: Test Users
run: pytest apps/users/
- name: Test Webpack build
run: |
npm install
npx webpack