CI #468
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
name: CI | |
on: | |
push: | |
branches: ['**'] | |
tags-ignore: ['**'] | |
pull_request: | |
schedule: | |
- cron: '0 2 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
activate: | |
if: | | |
(github.event_name == 'schedule' && github.repository_owner == 'asciidoctor') || | |
(github.event_name == 'push') || (github.event_name == 'pull_request') | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Proceed | |
run: echo ok go | |
build: | |
needs: activate | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, windows-latest] | |
ruby: [jruby-9.4, '2.7', '3.3'] | |
include: | |
- os: ubuntu-22.04 | |
ruby: jruby-9.2 | |
#- os: ubuntu-22.04 | |
# ruby: truffleruby | |
- os: macos-latest | |
ruby: '3.3' | |
runs-on: ${{ matrix.os }} | |
env: | |
# work around `Permission denied - NUL' error when installing/using the bundler gem on JRuby for Windows | |
JRUBY_OPTS: '-J-Djdk.io.File.enableADS=true' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: ${{ github.event_name != 'schedule' }} | |
- name: Install dependencies (scheduled build only) | |
if: github.event_name == 'schedule' | |
run: | | |
bundle config --local path vendor/bundle | |
bundle --jobs 3 --retry 3 | |
- name: Run tests | |
run: bundle exec rake test |