-
Notifications
You must be signed in to change notification settings - Fork 27
52 lines (52 loc) · 1.45 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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-latest
steps:
- name: Proceed
run: echo ok go
build:
needs: activate
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
ruby: [jruby-9.4, '2.7', '3.3']
include:
- os: ubuntu-latest
ruby: jruby-9.2
#- os: ubuntu-latest
# 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