-
Notifications
You must be signed in to change notification settings - Fork 46
80 lines (68 loc) · 2.05 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
name: "Gem Tests"
on:
- "pull_request"
jobs:
test:
strategy:
fail-fast: false
matrix:
ruby-version:
- "3.2"
gem:
# - "bullet_train"
# - "bullet_train-api"
# - "bullet_train-fields"
# - "bullet_train-has_uuid"
# - "bullet_train-incoming_webhooks"
# - "bullet_train-integrations"
# - "bullet_train-integrations-stripe"
# - "bullet_train-obfuscates_id"
# - "bullet_train-outgoing_webhooks"
- "bullet_train-roles"
# - "bullet_train-scope_questions"
# - "bullet_train-scope_validator"
# - "bullet_train-sortable"
# - "bullet_train-super_load_and_authorize_resource"
# - "bullet_train-super_scaffolding"
# - "bullet_train-themes"
# - "bullet_train-themes-light"
# - "bullet_train-themes-tailwind_css"
name: ${{ format('{0} / {1}', matrix.gem, matrix.ruby-version) }}
runs-on: "ubuntu-latest"
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 2s
--health-timeout 2s
--health-retries 5
ports:
- 5432:5432
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
RAILS_ENV: test
defaults:
run:
working-directory: ${{ matrix.gem }}
steps:
- uses: "actions/checkout@v3"
- name: Install PostgreSQL client
run: sudo apt-get -yqq install libpq-dev
# - name: "Use latest gems"
# run: rm Gemfile.lock
- uses: "ruby/setup-ruby@v1"
with:
rubygems: latest
bundler: latest
bundler-cache: true
ruby-version: ${{ matrix.ruby-version }}
working-directory: ${{ matrix.gem }} # setup-ruby doesn't pick up the job default.
- run: bin/rails db:setup
- name: Run Tests
run: bin/rails test test/