Skip to content

ci: tidy up workflows #185

ci: tidy up workflows

ci: tidy up workflows #185

Workflow file for this run

name: CI
on:
- push
- pull_request
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
JAVA_OPTS: -Djdk.io.File.enableADS=true
jobs:
ruleset:
name: Ruleset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: bazel run :buildifier.check
- run: bazel test ...
- if: failure() && runner.debug == '1'
uses: mxschmitt/action-tmate@v3
examples-gem:
name: Examples / Gem
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
ruby:
- 3.0.6
- 3.1.4
- 3.2.2
- 3.3.0-preview3
- jruby-9.4.5.0
- truffleruby-23.1.1
os:
- ubuntu
- macos
- windows
mode:
- bzlmod
- WORKSPACE
exclude:
# RubyInstaller doesn't ship previews
- os: windows
ruby: 3.3.0-preview3
# TruffleRuby doesn't work on Windows.
- os: windows
ruby: truffleruby-23.1.1
# https://github.com/p0deje/rules_ruby/issues/23
- mode: bzlmod
ruby: 3.0.6
- mode: bzlmod
ruby: 3.1.4
- mode: bzlmod
ruby: 3.2.2
- mode: bzlmod
ruby: 3.3.0-preview3
- mode: bzlmod
ruby: 3.0.6
- mode: bzlmod
ruby: truffleruby-23.1.1
defaults:
run:
working-directory: examples/gem
steps:
- uses: actions/checkout@v4
- uses: p0deje/[email protected]
with:
bazelrc: ${{ matrix.mode == 'bzlmod' && 'common --enable_bzlmod' }}
- run: echo 'RUBY_VERSION = "${{ matrix.ruby }}"' > ruby_version.bzl
- run: bazel test ...
- run: bazel run lib/gem:add-numbers 2
- run: bazel run lib/gem:print-version
- if: failure() && runner.debug == '1'
uses: mxschmitt/action-tmate@v3