-
Notifications
You must be signed in to change notification settings - Fork 37
83 lines (78 loc) · 2.16 KB
/
test.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ 3.1, '3.0', 2.7, 2.6, 2.5, 2.4, 2.3, ruby-head ]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
- name: Run test
run: bundle exec rake
rurema:
runs-on: ubuntu-latest
strategy:
matrix:
# NOTE: rurema/doctreeは2.5+しかサポートしていない
ruby: [ 3.1, '3.0', 2.7, 2.6, 2.5, ruby-head ]
steps:
- uses: actions/checkout@v2
with:
path: 'bitclust'
- uses: actions/checkout@v2
with:
repository: 'rurema/doctree'
path: 'doctree'
ref: 'master'
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
working-directory: ./doctree
- name: Run rake
run: bundle exec rake
working-directory: ./doctree
- name: Create tarballs
run: |
set -ex
mkdir /tmp/artifact
cd /tmp/html
for d in *.*; do
tar acf ../artifact/$d.tar.xz $d
done
- uses: actions/upload-artifact@v2
with:
name: statichtml-ubuntu-latest-${{ matrix.ruby }}
path: /tmp/artifact/*.tar.xz
- name: Rename generated html
run: |
cd /tmp
mv -v html html.pr
- uses: actions/checkout@v2
with:
path: 'bitclust'
ref: ${{ github.event.pull_request.base.sha }}
- name: Install dependencies
run: bundle install
working-directory: ./doctree
- name: Run rake
run: bundle exec rake
working-directory: ./doctree
- name: Rename generated html and generate diff
run: |
cd /tmp
mv -v html html.base
git diff --no-index html.base html.pr --stat || true
git diff --no-index html.base html.pr --output artifact/html.diff || true
- uses: actions/upload-artifact@v2
with:
name: diff-ubuntu-latest-${{ matrix.ruby }}
path: /tmp/artifact/html.diff