-
-
Notifications
You must be signed in to change notification settings - Fork 5
73 lines (61 loc) · 1.72 KB
/
specs_postgres_71.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
name: Specs Rails 7.1 Postgres
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.0', '3.1', '3.2', '3.3']
gemfile: ['rails_7_1_postgres']
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
DB_TEST: postgres
PG_DB_HOST: 127.0.0.1
PG_DB_USERNAME: postgres
PG_DB_PASSWORD: postgres
RAILS: '7.0'
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Install lib VIPS
run: sudo apt-get install -y libvips-dev
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Database setup
run: bundle exec rails db:create db:migrate
- name: Run tests
run: bundle exec rspec --profile
- name: Code Climate test coverage
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{github.workspace}}/coverage/lcov/active_storage_db.lcov:lcov
# - name: Upload coverage results
# uses: actions/upload-artifact@main
# if: always()
# with:
# name: coverage-report
# path: coverage/index.html