-
Notifications
You must be signed in to change notification settings - Fork 38
99 lines (95 loc) · 2.23 KB
/
main.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
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
name: Main
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
jobs:
validate:
runs-on: ubuntu-latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
services:
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
mongodb:
image: mongo:latest
ports:
- 27017:27017
redis:
image: redis:latest
ports:
- 6379:6379
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672
strategy:
matrix:
ruby-version:
- 2.7
- 3.0
- 3.1
- 3.2
- 3.3
appraisal:
- default
- bunny_2
- delayed_job_active_record_4
- delayed_job_mongoid_3
- good_job_2
- good_job_3
- queue_classic_4
- que_0
- que_1
- que_2
- rack_2
- rack_3
- resque_2
- sidekiq_6
- sidekiq_7
- solid_queue_0
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Appraisal setup
run: bundle install
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
- name: Run standard
run: bundle exec rake standard
- name: Run tests
run: bundle exec rake test:${{ matrix.appraisal }}
- name: Run build
run: bundle exec rake build
publish:
needs: validate
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
permissions:
contents: write
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Release Gem
uses: rubygems/release-gem@v1