-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github-workflows: test on containers
- Loading branch information
Showing
1 changed file
with
81 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,93 +5,94 @@ on: | |
schedule: | ||
- cron: 45 4 * * 2 | ||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby: | ||
- '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: sudo npm install -g svgo | ||
- run: bundle exec image_optim --info | ||
- run: bundle exec rspec | ||
legacy: | ||
# check: | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# ruby: | ||
# - '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: sudo 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: | ||
- ruby:1.9.3 | ||
- ruby:2.0 | ||
- ruby:2.1 | ||
- ruby:2.2 | ||
- debian:buster | ||
- debian:bullseye | ||
- debian:bookworm | ||
- debian:trixie | ||
- alpine | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: gem install bundler --version '< 2' | ||
- run: bundle install && bundle install # fighting platform specific gems problem in older bundler | ||
- run: | | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash | ||
. ~/.nvm/nvm.sh | ||
nvm install 16 | ||
npm install -g svgo | ||
echo "PATH=$PATH" >> $GITHUB_ENV | ||
if command -v apt &> /dev/null; then | ||
apt update | ||
apt -y install ruby rubygems | ||
elif command -v apk &> /dev/null; then | ||
apk add ruby rubygems | ||
fi | ||
gem install bundler | ||
- uses: actions/checkout@v3 | ||
- 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@v2 | ||
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 | ||
coverage: | ||
runs-on: ubuntu-latest | ||
env: | ||
CC_TEST_REPORTER_ID: b433c6540d220a2da0663670c9b260806bafdb3a43c6f22b2e81bfb1f87b12fe | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3' | ||
bundler-cache: true | ||
- run: sudo npm install -g svgo | ||
- uses: paambaati/[email protected] | ||
with: | ||
coverageCommand: 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@v2 | ||
# 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 | ||
# coverage: | ||
# runs-on: ubuntu-latest | ||
# env: | ||
# CC_TEST_REPORTER_ID: b433c6540d220a2da0663670c9b260806bafdb3a43c6f22b2e81bfb1f87b12fe | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: ruby/setup-ruby@v1 | ||
# with: | ||
# ruby-version: '3' | ||
# bundler-cache: true | ||
# - run: sudo npm install -g svgo | ||
# - uses: paambaati/[email protected] | ||
# with: | ||
# coverageCommand: bundle exec rspec |