-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (52 loc) · 1.4 KB
/
ci.yaml
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
name: CI
on:
push:
# Run on the main branch
branches:
- main
# Also on PRs, just be careful not to publish anything
pull_request:
# Allow to be called from other workflows (like "release")
workflow_call:
# But don't trigger on tags, as they are covered by the "release.yaml" workflow
# trigger nightly, to ensure it still works with newer data
schedule:
- cron: "45 2 * * *"
jobs:
fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Check formatting
run: |
cargo fmt --check
check:
runs-on: ubuntu-22.04
needs:
- fmt
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}
- name: Check
run: cargo check
- name: Test
run: cargo test
- name: Clone test data
uses: actions/checkout@v4
with:
repository: CVEProject/cvelistV5
path: cvelistV5
- name: Test against CVE database
env:
CVE_BASE_DIR: ${{github.workspace}}/cvelistV5
run: cargo run --example walkall