File: rspec.yml

package info (click to toggle)
ruby-test-prof 1.6.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,448 kB
  • sloc: ruby: 13,093; sh: 4; makefile: 4
file content (108 lines) | stat: -rw-r--r-- 2,985 bytes parent folder | download
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Build

on:
  push:
    branches:
    - master
  pull_request:

jobs:
  rspec:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    env:
      BUNDLE_JOBS: 4
      BUNDLE_RETRY: 3
      BUNDLE_GEMFILE: ${{ matrix.gemfile }}
      CI: true
      POSTGRES_URL: postgres://postgres:postgres@localhost:5432
      MYSQL_URL: mysql2://rails:rails@127.0.0.1:3306
      DB: ${{ matrix.db }}
      MULTI_DB: ${{ matrix.multi_db }}
      # Use postgres for all DB to avoid dealing with PG db creation
      DB_NAME: postgres
    strategy:
      fail-fast: false
      matrix:
        ruby: ["3.3"]
        gemfile: ["gemfiles/activerecord8.gemfile"]
        db: ["postgres"]
        include:
        - ruby: "4.0"
          gemfile: "gemfiles/activerecord8.gemfile"
          db: "postgres"
          multi_db: "true"
        - ruby: "4.0"
          gemfile: "gemfiles/railsmaster.gemfile"
          db: "mysql"
        - ruby: "4.0"
          gemfile: "gemfiles/railsmaster.gemfile"
          db: "sqlite"
        - ruby: "3.4"
          gemfile: "gemfiles/activerecord8.gemfile"
          db: "postgres"
          multi_db: "true"
        - ruby: "3.4"
          gemfile: "gemfiles/railsmaster.gemfile"
          db: "mysql"
        - ruby: "3.3"
          gemfile: "Gemfile"
          db: "sqlite"
        - ruby: "3.3"
          gemfile: "gemfiles/activerecord72.gemfile"
          db: "sqlite-file"
        - ruby: "3.2"
          gemfile: "gemfiles/activerecord7.gemfile"
          db: "sqlite-file"
          multi_db: "true"
        - ruby: "3.1"
          gemfile: "gemfiles/activerecord7.gemfile"
          db: "postgres"
          multi_db: "true"
        - ruby: "3.0"
          gemfile: "gemfiles/activerecord6.gemfile"
          db: "sqlite"
          db_url: ~
        - ruby: "3.0"
          gemfile: "gemfiles/rspecrails4.gemfile"
          db: "sqlite"
        - ruby: "3.4"
          gemfile: "gemfiles/railsmaster.gemfile"
          db: "sqlite"
    services:
      postgres:
        image: postgres:latest
        ports: ["5432:5432"]
        env:
          POSTGRES_PASSWORD: postgres
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
      mysql:
        image: mysql:8
        ports: ["3306:3306"]
        env:
          MYSQL_PASSWORD: rails
          MYSQL_ROOT_PASSWORD: root
          MYSQL_DATABASE: postgres
          MYSQL_USER: rails
        options: >-
          --health-cmd "mysqladmin ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
    steps:
    - uses: actions/checkout@v3
    - name: Install system deps
      run: |
        sudo apt-get update
        sudo apt-get install libsqlite3-dev libpq-dev postgresql-client
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
        bundler-cache: true
    - name: Run RSpec
      run: |
        bundle exec rspec --force-color