-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (47 loc) · 1.25 KB
/
rspec.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
name: Run rspec
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
RAILS_ENV: test
BUNDLE_FORCE_RUBY_PLATFORM: true
DEBIAN_FRONTEND: noninteractive
jobs:
build:
runs-on: ubuntu-latest
services:
db:
image: postgres
env:
POSTGRES_PASSWORD: opensuse
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Install preview generators
run: sudo apt-get install libvips42 poppler-utils shared-mime-info
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- name: Prepare environment
run: |
echo "127.0.0.1 db" | sudo tee /etc/hosts
cp config/database.sample.yml config/database.yml
cp config/site.sample.yml config/site.yml
cp config/storage.sample.yml config/storage.yml
bundler exec rails db:create
bundler exec rails db:migrate
- name: Run rspec
run: bundler exec rspec
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}