-
Notifications
You must be signed in to change notification settings - Fork 26
117 lines (111 loc) · 3.27 KB
/
test-suite.yaml
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: Run test suite
# Don't want to run this when tags are pushed
on:
push:
branches:
- "**"
jobs:
run-rspec-engines:
runs-on: ubuntu-latest
timeout-minutes: 60
services:
mysql:
image: mysql:8.0.28
ports:
- 3306
env:
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_ROOT_HOST: "%"
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
container:
image: nucoretxi/ruby-node-chrome-pack:3.3.0
credentials:
username: nucoretxi
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
env:
RAILS_ENV: test
MYSQL_HOST: mysql
MYSQL_USER: root
MYSQL_PASSWORD: root
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions
- name: Glob match
uses: tj-actions/glob@v22
id: glob
with:
files: |
vendor/engines/bulk_email/spec/**/*_spec.rb
vendor/engines/c2po/spec/**/*_spec.rb
vendor/engines/dataprobe/spec/**/*_spec.rb
vendor/engines/projects/spec/**/*_spec.rb
vendor/engines/saml_authentication/spec/**/*_spec.rb
vendor/engines/sanger_sequencing/spec/**/*_spec.rb
vendor/engines/split_accounts/spec/**/*_spec.rb
- run: bundle exec rspec ${{ steps.glob.outputs.paths }}
run-rspec:
runs-on: ubuntu-latest
timeout-minutes: 60
services:
mysql:
image: mysql:8.0.28
ports:
- 3306
env:
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_ROOT_HOST: "%"
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
container:
image: nucoretxi/ruby-node-chrome-pack:3.3.0
credentials:
username: nucoretxi
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
env:
RAILS_ENV: test
MYSQL_HOST: mysql
MYSQL_USER: root
MYSQL_PASSWORD: root
PARALLEL_TEST_PROCESSORS: 4
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions
# Uncomment below to open ssh tunnel for debugging
# - uses: mxschmitt/action-tmate@v3
- run: bundle exec rails parallel:create
- run: bundle exec rails parallel:load_schema
- run: bundle exec rails parallel:spec
run-teaspoon:
runs-on: ubuntu-latest
timeout-minutes: 60
services:
mysql:
image: mysql:8.0.28
ports:
- 3306
env:
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_ROOT_HOST: "%"
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
selenium:
image: selenium/standalone-chrome:latest
ports:
- 4444:4444
options: --shm-size="2g"
container:
image: nucoretxi/ruby-node-chrome-pack:3.3.0
credentials:
username: nucoretxi
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
env:
TEASPOON_RAILS_ENV: test
RAILS_ENV: test
MYSQL_HOST: mysql
MYSQL_USER: root
MYSQL_PASSWORD: root
SELENIUM_HOST: selenium
SELENIUM_PORT: 4444
TEST_APP_PORT: 3000
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions
- run: bundle exec rake teaspoon