-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (50 loc) · 1.61 KB
/
Copy pathmain.yml
File metadata and controls
52 lines (50 loc) · 1.61 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
48
49
50
51
52
---
name: PostgresKeyValue
on: [push, pull_request] # yamllint disable-line rule:truthy
jobs:
build:
runs-on: ubuntu-latest
env:
DB_NAME: postgres
DB_USER: postgres
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_HOST: localhost
DB_PORT: 5432
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${{ secrets.DB_PASSWORD }}
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
- name: install bundler
run: gem install bundler -v 2.2.3
- name: Install CC test reporter
# yamllint disable-line rule:line-length
run: curl -fsSL https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 >> test-reporter
- run: chmod +x test-reporter
- name: CC reporter before build
run: ./test-reporter before-build
- name: Bundling backend
run: bundle install --with=production test --without=development
- name: CC reporter before build
run: ./test-reporter before-build
- name: Unit Test
run: bundle exec rake
- name: CC reporter after build
run: ./test-reporter after-build --coverage-input-type simplecov
- name: Benchmark Test
run: bundle exec rake benchmark