-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.49 KB
/
rust.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
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12.4-alpine
env:
POSTGRES_DB: security_logs
POSTGRES_PASSWORD: 2UtcMAAvNuBHPqK9
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v1
- name: Clippy
run: cargo clippy -- -W clippy::pedantic
- name: Outdated
run: |
cargo install cargo-outdated && \
cargo outdated -d2
- name: Unused Deps
run: |
rustup update nightly && \
cargo +nightly install cargo-udeps && \
cargo +nightly udeps
- name: Build
run: cargo build --verbose
- name: Run tests
run: |
./target/debug/security-log-parse-rust run-migrations && \
cargo test --verbose --all && \
cargo install cargo-tarpaulin && \
cargo tarpaulin --verbose --all-features --workspace --out Xml
env:
DATABASE_URL: postgresql://postgres:2UtcMAAvNuBHPqK9@localhost:5432/security_logs
SERVER: cloud.ddboline.net
- name: Upload to codecov.io
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: cobertura.xml