-
Notifications
You must be signed in to change notification settings - Fork 109
112 lines (112 loc) · 2.97 KB
/
check.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
100
101
102
103
104
105
106
107
108
109
110
111
112
name: check
on:
push:
pull_request:
schedule:
- cron: 45 4 * * 2
jobs:
check:
runs-on: ubuntu-22.04
strategy:
matrix:
ruby:
- '1.9.3'
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3'
- jruby-9.4
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
bundler-cache: true
- run: npm install -g svgo
- run: bundle exec image_optim --info
- run: bundle exec rspec
containers:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
container:
- debian:buster
- debian:bullseye
- debian:bookworm
# - alpine
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
if command -v apt-get &> /dev/null; then
apt-get update
apt-get -y install make gcc git curl imagemagick ruby ruby-dev rubygems
fi
- run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 20
echo "PATH=$PATH" >> $GITHUB_ENV
- run: npm install -g svgo
- run: gem install bundler || gem install bundler --version '< 2.4'
- run: bundle install
- run: bundle exec bin/image_optim --info
- run: bundle exec rspec
windows:
runs-on: windows-latest
strategy:
matrix:
ruby:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3'
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
bundler-cache: true
- uses: actions/cache@v4
with:
path: "$HOME/bin"
key: ${{ runner.os }}
- run: |
mkdir "$HOME/bin"
git fetch origin windows-binaries
git --work-tree="$HOME/bin" checkout origin/windows-binaries -- '*.exe'
echo "$HOME/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: |
choco install --no-progress imagemagick
ls C:\'Program Files'\ImageMagick* | % FullName | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: npm install -g svgo
- run: bundle exec image_optim --info
- run: bundle exec rspec
update_worker_options_in_readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3'
bundler-cache: true
- run: script/update_worker_options_in_readme -n
coverage:
runs-on: ubuntu-22.04
env:
CC_TEST_REPORTER_ID: b433c6540d220a2da0663670c9b260806bafdb3a43c6f22b2e81bfb1f87b12fe
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3'
bundler-cache: true
- run: npm install -g svgo
- uses: paambaati/codeclimate-action@v9
with:
coverageCommand: bundle exec rspec