-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.19 KB
/
rubyonrails.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
name: "Ruby on Rails CI"
on:
push:
branches-ignore:
- develop
- staging
- main
pull_request:
jobs:
unit-test:
runs-on: ubuntu-20.04
services:
postgres:
image: postgis/postgis:11-2.5
ports:
- "5432:5432"
env:
POSTGRES_DB: rails_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
env:
RAILS_ENV: test
DATABASE_URL: "postgis://rails:password@localhost:5432/rails_test"
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/[email protected]
with:
bundler-cache: true
- name: Set up database schema
run: bin/rails db:test:prepare
- name: Compile assets
run: NODE_OPTIONS=--openssl-legacy-provider bin/rails assets:precompile
- name: Run unit tests
run: bin/rake
- name: publish code coverage
uses: paambaati/[email protected]
with:
debug: true
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'develop' }}