-
Notifications
You must be signed in to change notification settings - Fork 16
49 lines (46 loc) · 1.17 KB
/
push-and-pr-testing-ruby-ci.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
# This workflow enables CI checks based on Alpine and Ruby versions.
# Images used: ruby:a.b-alpine
name: Ruby
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: "ubuntu-latest"
strategy:
matrix:
container_tag:
- 3.2-alpine
- 3.1-alpine
- 3.0-alpine
container:
image: ruby:${{ matrix.container_tag }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
apk update
apk upgrade --force
# when using ruby some gems need to get built
apk add build-base alpine-sdk openssl-dev ruby-dev
# get git to use gems from github as well
apk add git
- name: Update rubygems & bundler
run: |
ruby -v
gem update --system | head -n 8
gem install bundler
- name: Install gems
run: |
# handle IPv6 issues with bundler
echo ":ipv4_fallback_enabled: true" > .gemrc
export GEMRC=".gemrc"
bundle install
- name: Run rubocop
run: |
bundle exec rake rubocop
- name: Run minitest
run: |
bundle exec rake test:all V=1