CI Matrix Testing #431
This file contains hidden or 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
# testing | |
name: CI Matrix Testing | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '21 3 * * *' | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, macos] | |
ruby: [3.1, 3.4] | |
container: ${{ (matrix.os == 'ubuntu' && matrix.ruby == '3.4') && 'rubydistros/ubuntu-24.04:3.4' || '' }} | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
if [ "${{ matrix.ruby }}" == "3.1" ]; then | |
# For Ruby 3.1 on standard Ubuntu runner | |
sudo apt-get update && sudo apt-get install -y graphviz libarchive-dev | |
elif [ "${{ matrix.ruby }}" == "3.4" ]; then | |
# For Ruby 3.4 in custom container, install without sudo | |
apt-get update && apt-get install -y graphviz libarchive-dev | |
fi | |
elif [ "$RUNNER_OS" == "Windows" ]; then | |
choco install graphviz | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
brew install graphviz libarchive | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
shell: bash | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: ${{ matrix.ruby }} | |
- run: bundle exec rake spec | |
if: always() | |
- run: bundle exec rake features | |
if: always() | |
- run: bundle exec rake style | |
if: always() |