-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (48 loc) · 1.22 KB
/
run_tests_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
name: Zooni CI
on:
pull_request:
push: { branches: main }
env:
DATABASE_URL: postgresql://kade:kade@localhost/gh_ci_test
RAILS_ENV: test
DISABLE_TEST_LOGGING: test
CI: true
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13-alpine
env:
POSTGRES_USER: kade
POSTGRES_PASSWORD: kade
ports: ['5432:5432']
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- name: Check for focus specs
run: |
! grep -R --exclude=spec_helper.rb "\(describe\|context\|it\).*\(:focus\|focus:\)" spec/
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
- name: Setup DB and configs
run: bundle exec bin/rails db:setup
- name: Run tests
run: bundle exec bin/rspec