-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (79 loc) · 2.23 KB
/
testing.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: testing
on:
push:
branches:
- 'main'
paths:
- 'src/**/*'
- 'tests/**/*'
- '**/Cargo.toml'
- '**/Cargo.lock'
- 'docker-compose.yml'
- '.github/workflows/testing.yml'
pull_request:
branches:
- 'main'
paths:
- 'src/**/*'
- 'tests/**/*'
- '**/Cargo.toml'
- '**/Cargo.lock'
- 'docker-compose.yml'
- '.github/workflows/testing.yml'
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: test
runs-on: ubuntu-latest
# container:
# image: xd009642/tarpaulin
# options: --security-opt seccomp=unconfined
steps:
- name: checkout
uses: actions/checkout@v4
- name: start wiki instance
uses: isbang/compose-action@v1.5.1
with:
compose-file: "./docker-compose.yml"
- name: wait for wiki to be reachable
uses: cygnetdigital/wait_for_response@v2.0.0
- name: install dependencies
run: |
sudo apt update
sudo apt install httpie
- name: run initial wiki setup
run: scripts/finalize_wiki_setup.sh
- name: install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: install rust cache
uses: Swatinem/rust-cache@v2
- name: run tests
run: cargo test
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: start wiki instance
uses: isbang/compose-action@v1.5.1
with:
compose-file: "./docker-compose.yml"
- name: wait for wiki to be reachable
uses: cygnetdigital/wait_for_response@v2.0.0
- name: install dependencies
run: |
sudo apt update
sudo apt install httpie
- name: run initial wiki setup
run: scripts/finalize_wiki_setup.sh
- name: install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: install rust cache
uses: Swatinem/rust-cache@v2
- name: run coverage check
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.15.0'
args: '--workspace --fail-under 5 --exclude-files src/cli/* --exclude-files src/fuse/* --exclude-files tests/* --exclude-files gql/*'