-
Notifications
You must be signed in to change notification settings - Fork 9
64 lines (49 loc) · 1.35 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
name: CI
on:
pull_request:
branches:
- '**'
jobs:
build-tool:
name: 'Build and Compile the Tool'
runs-on: 'ubuntu-latest'
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Go into the Go module directory
uses: actions/setup-go@v2
with:
go-version: 1.x
- name: Build
run: go build
- name: Test
run: go test . ./internal/... ./subcmd/...
diff:
name: 'Compare Site'
runs-on: 'ubuntu-latest'
steps:
- name: 'Check out target branch (commit)'
uses: 'actions/checkout@v2'
with:
# FIXME: 全部取るのはやりすぎ。必要最小限(mereg-base origin/master
# HEAD)までだけ取れたら良いのだが…
fetch-depth: 0
- name: 'Preparations'
run: |
# origin/master の ref が比較のために要る
git fetch origin master
# log-data の取得と展開
make logdata
# 出力用のディレクトリ
mkdir -p tmp
- name: 'Compare site'
run: |
./scripts/site_diff.sh -o tmp/site.diff
- uses: actions/upload-artifact@v2
with:
name: diffs-${{ github.run_id }}
path: tmp/site.diff
- uses: actions/upload-artifact@v2
with:
name: log-site-diff-${{ github.run_id }}
path: tmp/site_diff/*.log