-
Notifications
You must be signed in to change notification settings - Fork 58
149 lines (147 loc) · 4.35 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '02 4 * * *'
jobs:
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- run : bundle exec rake rubocop
rbi-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- run : bundle exec tapioca gem --verify
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- run : bundle exec srb
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
RUN_GENERATORS: ${{ matrix.run_generators }}
PGPASSWORD: password
DATABASE_ADAPTER: ${{ matrix.database_adapter }}
DATABASE_NAME: ${{ matrix.database_name }}
DATABASE_PASSWORD: ${{ matrix.database_password }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
strategy:
fail-fast: false
matrix:
rvm: ["3.2.2"]
gemfile: ["Gemfile"]
bundler: ['default']
run_generators: ["false"]
database_adapter: ['sqlite3']
database_name: [":memory:"]
database_password: ["password"]
include:
- rvm: ruby-head
gemfile: gemfiles/rails_master.gemfile
bundler: 'default'
run_generators: "false"
database_adapter: 'sqlite3'
database_name: ":memory:"
- rvm: 2.7
gemfile: gemfiles/rails_5.2.gemfile
bundler: 'default'
run_generators: "false"
database_adapter: 'sqlite3'
database_name: ":memory:"
- rvm: 2.7
gemfile: gemfiles/rails_6.0.gemfile
bundler: 'default'
run_generators: "false"
database_adapter: 'sqlite3'
database_name: ":memory:"
- rvm: 2.7
gemfile: gemfiles/rails_5.2.gemfile
bundler: 'default'
run_generators: "false"
database_adapter: 'sqlite3'
database_name: ":memory:"
- rvm: 2.7
gemfile: gemfiles/rails_6.0.gemfile
bundler: 'default'
run_generators: "true"
database_adapter: 'sqlite3'
database_name: ":memory:"
- rvm: 2.7
gemfile: gemfiles/rails_6.0.gemfile
bundler: 'default'
database_adapter: 'postgresql'
database_name: 'ci_test'
database_password: "password"
run_generators: "false"
- rvm: 3
gemfile: gemfiles/rails_7.0.gemfile
bundler: 'default'
run_generators: "true"
database_adapter: 'sqlite3'
database_name: ":memory:"
steps:
- uses: actions/checkout@v2
- run: sudo apt-get install libyaml-dev
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.rvm }}
bundler: ${{ matrix.bundler }}
bundler-cache: true
- run: psql -c 'create database ci_test;' -U postgres -h localhost
- run: bundle exec rake
readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- run: 'bundle exec rake readme'
documentation:
runs-on: ubuntu-latest
needs: ['test', 'static']
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- run: 'bundle exec yard doc --private'
- uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages
folder: doc