File: ci.yml

package info (click to toggle)
ruby-marginalia 1.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 140 kB
  • sloc: ruby: 631; makefile: 4
file content (49 lines) | stat: -rw-r--r-- 1,030 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
name: CI

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        ruby-version: ["2.6", "2.7", "3.0"]
        rails-version: ["5.2.0", "6.0.0", "6.1.0"]
        exclude:
          # Rails 5.2 does not support Ruby 3.0
          - {ruby-version: "3.0", rails-version: "5.2.0"}

    services:
      mysql:
        image: mysql
        env:
          MYSQL_ALLOW_EMPTY_PASSWORD: yes
        ports:
          - 3306:3306
      postgres:
        image: postgres
        env:
          POSTGRES_PASSWORD: password
          POSTGRES_HOST_AUTH_METHOD: trust
        ports:
          - 5432:5432

    env:
      RAILS_VERSION: ${{ matrix.rails-version }}
      MYSQL_HOST: 127.0.0.1
      PGHOST: 127.0.0.1
      DB_HOST: 127.0.0.1

    steps:
    - uses: actions/checkout@v2

    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby-version }}
        bundler-cache: true

    - name: Run tests
      run: bundle exec rake db:reset test:all