Compare commits

...

2 Commits

Author SHA1 Message Date
be0fcb9a61 Remove unused dependency 2022-01-10 15:37:30 +01:00
c8baffb3dc Setup Github actions 2022-01-10 15:30:36 +01:00
4 changed files with 74 additions and 29 deletions

16
.github/workflows/audit.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

58
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
on: [push]
name: CI
jobs:
format:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
override: true
- uses: LoliGothick/rustfmt-check@v0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
flags: --all
options: --manifest-path=Cargo.toml
build_and_test:
name: contextswitch-api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D warnings
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.15.0'
args: '-- --test-threads 1'
- name: Upload to codecov.io
uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: cobertura.xml

28
Cargo.lock generated
View File

@@ -338,7 +338,6 @@ dependencies = [
"tokio", "tokio",
"tracing", "tracing",
"tracing-actix-web", "tracing-actix-web",
"tracing-bunyan-formatter",
"tracing-log", "tracing-log",
"tracing-subscriber", "tracing-subscriber",
"uuid", "uuid",
@@ -561,16 +560,6 @@ dependencies = [
"version_check", "version_check",
] ]
[[package]]
name = "gethostname"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e692e296bfac1d2533ef168d0b60ff5897b8b70a4009276834014dd8924cc028"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.3" version = "0.2.3"
@@ -1539,23 +1528,6 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "tracing-bunyan-formatter"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cb2ad6aa9b1c637d84c54db002275bbf72a7f3c6fed80f8b33f5af0c39027e9"
dependencies = [
"gethostname",
"log",
"serde",
"serde_json",
"time 0.3.5",
"tracing",
"tracing-core",
"tracing-log",
"tracing-subscriber",
]
[[package]] [[package]]
name = "tracing-core" name = "tracing-core"
version = "0.1.21" version = "0.1.21"

View File

@@ -26,7 +26,6 @@ dotenv = "0.15.0"
listenfd = "0.3.0" listenfd = "0.3.0"
tracing = { version = "0.1.0", features = ["log"] } tracing = { version = "0.1.0", features = ["log"] }
tracing-subscriber = { version = "0.3.0", features = ["std", "env-filter", "fmt", "json"] } tracing-subscriber = { version = "0.3.0", features = ["std", "env-filter", "fmt", "json"] }
tracing-bunyan-formatter = "0.3.0"
tracing-log = "0.1.0" tracing-log = "0.1.0"
tracing-actix-web = "=0.5.0-beta.9" tracing-actix-web = "=0.5.0-beta.9"