-
Notifications
You must be signed in to change notification settings - Fork 108
66 lines (63 loc) · 1.91 KB
/
test.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
name: Test
on: [push, pull_request]
jobs:
test:
name: RSpec
strategy:
fail-fast: false
matrix:
ruby: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
gemfile: [gemfiles/carrierwave-3.gemfile]
experimental: [false]
include:
- ruby: '3.4'
gemfile: gemfiles/carrierwave-2.gemfile
experimental: false
- ruby: '3.4'
gemfile: gemfiles/carrierwave-master.gemfile
experimental: false
- ruby: ruby-head
gemfile: gemfiles/carrierwave-3.gemfile
experimental: true
- ruby: jruby-head
gemfile: gemfiles/carrierwave-2.gemfile
experimental: false
runs-on: ubuntu-24.04
continue-on-error: ${{ matrix.experimental }}
env:
S3_BUCKET_NAME: test-bucket
S3_ACCESS_KEY: DummyAccessKey
S3_SECRET_ACCESS_KEY: DummySecret
AWS_REGION: us-east-1
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
JRUBY_OPTS: --debug
steps:
- name: Run minio
run: |
mkdir -p /tmp/data/test-bucket
docker run -d -p 9000:9000 --name minio \
-e "MINIO_ACCESS_KEY=${{ env.S3_ACCESS_KEY }}" \
-e "MINIO_SECRET_KEY=${{ env.S3_SECRET_ACCESS_KEY }}" \
-v /tmp/data:/data \
-v /tmp/config:/root/.minio \
minio/minio server /data
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run RSpec
run: bundle exec rake spec
rubocop:
name: RuboCop
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
- name: Run check
run: bundle exec rake rubocop