Skip to content

Use ruby 3.3!

Use ruby 3.3! #137

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- name: Install dependencies
run: bundle install
- name: Run rubocop
run: bundle exec rubocop
build:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux, darwin, windows]
arch: [amd64]
include:
- os: windows
suffix: .exe
exclude:
- os: windows
arch: arm64
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: build
run: rake build:${{ matrix.os }}-${{ matrix.arch }}
- name: Upload test binary (${{ matrix.os }}-${{ matrix.arch }}})
uses: actions/upload-artifact@v4
with:
name: rf-${{ github.sha }}-${{ matrix.os }}-${{ matrix.arch }}
path: build/${{ matrix.os }}-${{ matrix.arch }}/bin/rf${{ matrix.suffix }}
test:
needs: build
strategy:
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
include:
- runs-on: ubuntu-latest
os-arch: linux-amd64
- runs-on: macos-latest
os-arch: darwin-amd64
- runs-on: windows-latest
os-arch: windows-amd64
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: rf-${{ github.sha }}-${{ matrix.os-arch }}
path: build/bin
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Grant execute permission
if: ${{ ! contains(matrix.runs-on, 'windows') }}
run: chmod +x build/bin/rf
- name: Run test
run: bundle exec rake spec