-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.26 KB
/
Copy pathruby.yml
File metadata and controls
47 lines (40 loc) · 1.26 KB
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
name: Ruby
on: [push]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
- name: Install PostgreSQL 11 client
run: |
sudo apt-get -yqq install libpq-dev
- name: Install CodeClimate Reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
if: github.ref == 'refs/heads/master'
- name: Build and run rspec
run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec rspec
env:
COVERAGE: 1
RACK_ENV: test
- name: Report code coverage
run: ./cc-test-reporter after-build -r ${{secrets.CC_TEST_REPORTER_ID}}
if: github.ref == 'refs/heads/master'