-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (95 loc) · 3.65 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
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Automated tests
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
env:
RUSTFLAGS: "-C debuginfo=0"
jobs:
test_linux:
name: Execute automated tests on Ubuntu Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rust-lang/[email protected]
- run: cargo build --all-features --verbose
- run: cargo test --all-features --verbose
env:
RUST_LOG: debug
- run: misc/download-mdbook.sh 0.3.5
env:
OS_NAME: linux
- name: Generate the documentation
run: mdbook build docs/
test_windows:
name: Execute automated tests on Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions-rust-lang/[email protected]
- run: cargo build --all-features --verbose
- run: cargo test --all-features --verbose
env:
RUST_LOG: debug
test_mac:
name: Execute automated tests on OSX
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- uses: actions-rust-lang/[email protected]
- run: cargo build --all-features --verbose
- run: cargo test --all-features --verbose
env:
RUST_LOG: debug
long_running_tests:
name: Execute search tests
runs-on: ubuntu-20.04
env:
RUST_LOG: debug
steps:
- uses: actions/checkout@v2
- uses: actions-rust-lang/[email protected]
- uses: actions/cache@v4
id: corpus-cache
with:
path: |
relannis
data
data_ondisk
key: ${{ runner.os }}-search-compatible-${{ 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: Run integration tests (memory)
run: cargo test --tests --release -- --ignored
working-directory: graphannis
- name: "Create data_ondisk directory"
run: "mkdir -p data_ondisk"
- name: Import GUM corpus (ondisk)
if: steps.corpus-cache.outputs.cache-hit != 'true'
run: ./target/release/annis data_ondisk --cmd 'set-disk-based on' --cmd 'import relannis/GUM'
- name: Import pcc2.1 corpus (ondisk)
if: steps.corpus-cache.outputs.cache-hit != 'true'
run: ./target/release/annis data_ondisk --cmd 'set-disk-based on' --cmd 'import relannis/pcc2.1'
- name: Import subtok.demo corpus (ondisk)
if: steps.corpus-cache.outputs.cache-hit != 'true'
run: ./target/release/annis data_ondisk --cmd 'set-disk-based on' --cmd 'import relannis/subtok.demo'
- name: Run integration tests (ondisk)
run: cargo test --tests --release -- --ignored
working-directory: graphannis
env:
ANNIS4_TEST_DATA: "../data_ondisk"