-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (66 loc) · 2.27 KB
/
verify.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
name: Verify
on:
push:
branches:
- main
pull_request:
jobs:
merge-request-checks:
name: Run verify.sh
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install diff-cover
uses: threeal/[email protected]
with:
packages: diff_cover
- uses: actions-rust-lang/[email protected]
with:
toolchain: stable
- uses: actions/cache@v4
id: corpus-cache
with:
path: |
relannis
data
data_ondisk
key: ${{ runner.os }}-codecov-${{ hashFiles('graphannis/tests/searchtest.rs','graphannis/tests/searchtest_queries.csv', 'graphannis/build.rs') }}
- name: Download test corpora
if: steps.corpus-cache.outputs.cache-hit != 'true'
run: test -d relannis/GUM/ -a -d relannis/pcc2.1/ -a -d relannis/subtok.demo || "./misc/download-test-corpora.sh"
- name: Build CLI binary
if: steps.corpus-cache.outputs.cache-hit != 'true'
run: cargo build --release --bin annis
- name: Import GUM corpus (memory)
if: steps.corpus-cache.outputs.cache-hit != 'true'
run: ./target/release/annis data --cmd 'import relannis/GUM'
- name: Import pcc2.1 corpus (memory)
if: steps.corpus-cache.outputs.cache-hit != 'true'
run: ./target/release/annis data --cmd 'import relannis/pcc2.1'
- name: Import subtok.demo corpus (memory)
if: steps.corpus-cache.outputs.cache-hit != 'true'
run: ./target/release/annis data --cmd 'import relannis/subtok.demo'
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run verify.sh
run: ./verify.sh
- name: Generate code coverage comment
id: pr
run: |
{
echo 'COVERAGE_INFO<<EOF'
diff-cover target/llvm-cov/tests.lcov
echo EOF
} >> "$GITHUB_ENV"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_OUTPUT: TRUE
- uses: mshick/add-pr-comment@v2
with:
message: |
Commit ${{ github.event.pull_request.head.sha }}
```
${{env.COVERAGE_INFO}}
```