-
Notifications
You must be signed in to change notification settings - Fork 17
78 lines (74 loc) · 2.43 KB
/
Copy pathci.yml
File metadata and controls
78 lines (74 loc) · 2.43 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
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
name: build
on:
push:
branches:
- master
- github-actions
pull_request:
schedule:
- cron: "0 18 * * 6" # Saturdays at 12pm CST
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test:
name: Ruby ${{ matrix.ruby-version }} / ${{ matrix.active-record.label }}
runs-on: ubuntu-latest
timeout-minutes: 20
env:
CI: true
strategy:
fail-fast: false
matrix:
ruby-version: ["3.3", "3.4", "4.0"]
active-record:
- label: AR 8.0
env: ACTIVE_RECORD_VERSION=~> 8.0.0
- label: AR 8.1
env: ACTIVE_RECORD_VERSION=~> 8.1.0
allow-failure: [false]
include:
- ruby-version: "4.0"
active-record:
label: AR main
env: ACTIVE_RECORD_BRANCH=main
allow-failure: true
- ruby-version: "4.0"
active-record:
label: AR 8-1-stable
env: ACTIVE_RECORD_BRANCH=8-1-stable
allow-failure: true
- ruby-version: "4.0"
active-record:
label: AR 8-0-stable
env: ACTIVE_RECORD_BRANCH=8-0-stable
allow-failure: true
# A canary for the next Ruby, which cannot fail the build.
- ruby-version: ruby-head
active-record:
label: AR 8.1
env: ACTIVE_RECORD_VERSION=~> 8.1.0
allow-failure: true
continue-on-error: ${{ matrix.allow-failure }}
steps:
- uses: actions/checkout@v7
# Set the version here rather than prefixing each command, so the matrix
# value reaches the environment without being interpolated into a script.
- name: Select Active Record version
env:
ACTIVE_RECORD_ENV: ${{ matrix.active-record.env }}
run: echo "$ACTIVE_RECORD_ENV" >> "$GITHUB_ENV"
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
cache-version: ${{ matrix.active-record.env }}
# Not bin/rake: bin/ holds generated binstubs and is not checked in, and
# whether bundling writes them there varies by Bundler version - Bundler 4
# does not, which left Ruby 4.0 with no binstub to run.
- name: Run tests
run: bundle exec rake