Skip to content

Bump parallel_tests from 4.2.1 to 4.2.2 #58

Bump parallel_tests from 4.2.1 to 4.2.2

Bump parallel_tests from 4.2.1 to 4.2.2 #58

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.2
- 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@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Build cache
uses: actions/cache@v3
with:
path: build/cache
key: ${{ matrix.os }}-${{ matrix.arch }}-ccache
- name: build
run: rake build:${{ matrix.os }}-${{ matrix.arch }}
- name: Upload test binary (${{ matrix.os }}-${{ matrix.arch }}})
uses: actions/upload-artifact@v3
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@v3
with:
name: rf-${{ github.sha }}-${{ matrix.os-arch }}
path: build/bin
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
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