-
Notifications
You must be signed in to change notification settings - Fork 6
52 lines (44 loc) · 1.39 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
name: Ruby
on:
pull_request:
push: { branches: [master] }
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [3.3.5, 3.2.4, 3.1.5, 3.0.7]
env:
RUBY_LATEST_VERSION: "3.3.5"
RUBY_VERSION: ${{ matrix.ruby-version }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Run Specs for V5 Puma
run: |
set -x; set -e; \
gem install bundler:2.5.23; \
export BUNDLE_GEMFILE=Gemfile.puma-v5; \
bundle install -j 4 && bundle exec rspec 2>/dev/null
- name: Run Specs fo V6 Puma
run: |
set -x; set -e; \
gem install bundler:2.5.23; \
export BUNDLE_GEMFILE=Gemfile.puma-v6; \
bundle install -j 4 && bundle exec rspec 2>/dev/null
- name: Rubocop
run: |
export BUNDLE_GEMFILE=Gemfile.puma-v6; \
bundle exec rubocop --parallel --format progress
- name: Upload to Codecov
run: |
# only upload for the latest Ruby Version
if [[ $(ruby -e 'puts RUBY_VERSION') == "${RUBY_LATEST_VERSION}" ]]; then
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
fi