-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (46 loc) · 1.17 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
name: Test
env:
RUST_BACKTRACE: 1
on:
push:
branches: [main, staging, trying]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Check out the repo
uses: actions/checkout@v2
- name: Build with cargo
run: cargo build --all --verbose
- name: Run cargo tests
run: cargo test --all --verbose
- name: Check formatting
run: |
if rustfmt --help ; then
cargo fmt -- --check
fi
- name: Check extractor
run: python3 extractor-test/test_extractor.py
- name: Compile the example packages
run: |
mkdir ../workspace
cp CrateList-example.json CrateList.json
cargo run -- compile
- name: Create a database
run: cargo run --release -- update-database
- name: Run existing queries
run: cargo run --release -- query all
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}