-
-
Notifications
You must be signed in to change notification settings - Fork 78
66 lines (66 loc) · 1.99 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI
on:
push:
branches: ['**']
paths-ignore: ['*.adoc', 'docs/**']
pull_request:
paths-ignore: ['*.adoc', 'docs/**']
#schedule:
#- cron: '30 2 * * MON'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
ruby: ['2.4', '2.7', '3.2']
jekyll-version: [~]
pygments-version: [~]
exclude:
# remove entry to mark as primary
- os: ubuntu-latest
ruby: '2.7'
include:
- os: windows-latest
ruby: '2.7'
- os: ubuntu-latest
ruby: '2.7'
pygments-version: '1.2.0'
- os: ubuntu-latest
ruby: '2.7'
jekyll-version: '3.9.0'
- os: ubuntu-latest
ruby: '2.7'
primary: primary
runs-on: ${{ matrix.os }}
env:
BUNDLE_WITHOUT: coverage:docs:lint
SOURCE_DATE_EPOCH: '1521504000'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Enable lint and coverage (primary only)
if: matrix.primary
run: |
echo 'BUNDLE_WITHOUT=docs' >> $GITHUB_ENV
echo 'COVERAGE=deep' >> $GITHUB_ENV
- name: Install Ruby (uses cached dependencies for non-scheduled build)
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: Install prerequisites for Pygments ~> 1.2.0 (Linux)
if: matrix.os == 'ubuntu-latest' && matrix.pygments-version == '1.2.0'
run: sudo apt-get install python2
- name: Run linter (primary only)
if: matrix.primary
run: bundle exec rake lint
- name: Run tests
run: bundle exec ruby -w $(bundle exec ruby -e 'print File.join Gem.bindir, %q(rake)') spec