haha json go brrr (#324)
This commit is contained in:
parent
f9faa33686
commit
1bc63deb73
|
|
@ -1,125 +1,173 @@
|
||||||
name: CI
|
{
|
||||||
|
"name": "CI",
|
||||||
on:
|
"on": {
|
||||||
push:
|
"push": {
|
||||||
branches: [ master ]
|
"branches": [
|
||||||
pull_request:
|
"master"
|
||||||
branches: [ master ]
|
]
|
||||||
|
},
|
||||||
jobs:
|
"pull_request": {
|
||||||
check:
|
"branches": [
|
||||||
name: Check
|
"master"
|
||||||
runs-on: ubuntu-latest
|
]
|
||||||
strategy:
|
}
|
||||||
fail-fast: false
|
},
|
||||||
matrix:
|
"jobs": {
|
||||||
rust:
|
"check": {
|
||||||
- stable
|
"name": "Check",
|
||||||
- beta
|
"runs-on": "ubuntu-latest",
|
||||||
- nightly
|
"strategy": {
|
||||||
- 1.18.0 # MSRV
|
"fail-fast": false,
|
||||||
|
"matrix": {
|
||||||
steps:
|
"rust": [
|
||||||
- uses: actions/checkout@v2
|
"stable",
|
||||||
name: Checkout
|
"beta",
|
||||||
|
"nightly",
|
||||||
- uses: actions-rs/toolchain@v1
|
"1.18.0"
|
||||||
with:
|
]
|
||||||
profile: minimal
|
}
|
||||||
toolchain: ${{ matrix.rust }}
|
},
|
||||||
override: true
|
"steps": [
|
||||||
name: Install Rust ${{ matrix.rust }}
|
{
|
||||||
|
"uses": "actions/checkout@v2",
|
||||||
- uses: actions-rs/cargo@v1
|
"name": "Checkout"
|
||||||
with:
|
},
|
||||||
command: check
|
{
|
||||||
name: Run `cargo check`
|
"uses": "actions-rs/toolchain@v1",
|
||||||
|
"with": {
|
||||||
- uses: actions-rs/cargo@v1
|
"profile": "minimal",
|
||||||
with:
|
"toolchain": "${{ matrix.rust }}",
|
||||||
command: check
|
"override": true
|
||||||
args: --examples
|
},
|
||||||
name: Check examples
|
"name": "Install Rust ${{ matrix.rust }}"
|
||||||
if: matrix.rust != '1.18.0'
|
},
|
||||||
|
{
|
||||||
test:
|
"uses": "actions-rs/cargo@v1",
|
||||||
name: Test
|
"with": {
|
||||||
runs-on: ubuntu-latest
|
"command": "check"
|
||||||
strategy:
|
},
|
||||||
matrix:
|
"name": "Run `cargo check`"
|
||||||
rust:
|
},
|
||||||
- stable
|
{
|
||||||
- beta
|
"uses": "actions-rs/cargo@v1",
|
||||||
- nightly
|
"with": {
|
||||||
steps:
|
"command": "check",
|
||||||
- uses: actions/checkout@v2
|
"args": "--examples"
|
||||||
name: Checkout
|
},
|
||||||
|
"name": "Check examples",
|
||||||
- uses: actions-rs/toolchain@v1
|
"if": "matrix.rust != '1.18.0'"
|
||||||
with:
|
}
|
||||||
profile: minimal
|
]
|
||||||
toolchain: ${{ matrix.rust }}
|
},
|
||||||
override: true
|
"test": {
|
||||||
name: Install Rust ${{ matrix.rust }}
|
"name": "Test",
|
||||||
|
"runs-on": "ubuntu-latest",
|
||||||
- uses: actions-rs/cargo@v1
|
"strategy": {
|
||||||
with:
|
"matrix": {
|
||||||
command: test
|
"rust": [
|
||||||
name: Run `cargo test`
|
"stable",
|
||||||
|
"beta",
|
||||||
lints:
|
"nightly"
|
||||||
name: Lints
|
]
|
||||||
runs-on: ubuntu-latest
|
}
|
||||||
steps:
|
},
|
||||||
- uses: actions/checkout@v2
|
"steps": [
|
||||||
name: Checkout
|
{
|
||||||
|
"uses": "actions/checkout@v2",
|
||||||
- uses: actions-rs/toolchain@v1
|
"name": "Checkout"
|
||||||
with:
|
},
|
||||||
profile: minimal
|
{
|
||||||
toolchain: stable
|
"uses": "actions-rs/toolchain@v1",
|
||||||
override: true
|
"with": {
|
||||||
components: rustfmt, clippy
|
"profile": "minimal",
|
||||||
name: Install Rust stable
|
"toolchain": "${{ matrix.rust }}",
|
||||||
|
"override": true
|
||||||
- uses: actions-rs/cargo@v1
|
},
|
||||||
with:
|
"name": "Install Rust ${{ matrix.rust }}"
|
||||||
command: fmt
|
},
|
||||||
args: --all -- --check
|
{
|
||||||
name: Run `cargo fmt`
|
"uses": "actions-rs/cargo@v1",
|
||||||
|
"with": {
|
||||||
- uses: actions-rs/cargo@v1
|
"command": "test"
|
||||||
with:
|
},
|
||||||
command: clippy
|
"name": "Run `cargo test`"
|
||||||
args: -- -D warnings
|
}
|
||||||
name: Run `cargo clippy`
|
]
|
||||||
|
},
|
||||||
coverage:
|
"lints": {
|
||||||
name: Code Coverage
|
"name": "Lints",
|
||||||
runs-on: ubuntu-latest
|
"runs-on": "ubuntu-latest",
|
||||||
steps:
|
"steps": [
|
||||||
- uses: actions/checkout@v2
|
{
|
||||||
name: Checkout
|
"uses": "actions/checkout@v2",
|
||||||
|
"name": "Checkout"
|
||||||
- uses: actions-rs/toolchain@v1
|
},
|
||||||
with:
|
{
|
||||||
profile: minimal
|
"uses": "actions-rs/toolchain@v1",
|
||||||
toolchain: nightly
|
"with": {
|
||||||
override: true
|
"profile": "minimal",
|
||||||
name: Install Rust nightly
|
"toolchain": "stable",
|
||||||
|
"override": true,
|
||||||
- name: Run cargo-tarpaulin
|
"components": "rustfmt, clippy"
|
||||||
uses: actions-rs/tarpaulin@v0.1
|
},
|
||||||
with:
|
"name": "Install Rust stable"
|
||||||
version: '0.12.3'
|
},
|
||||||
args: '--ignore-tests -- --test-threads 1'
|
{
|
||||||
|
"uses": "actions-rs/cargo@v1",
|
||||||
- name: Upload to codecov.io
|
"with": {
|
||||||
uses: codecov/codecov-action@v1
|
"command": "fmt",
|
||||||
|
"args": "--all -- --check"
|
||||||
- name: Archive code coverage results
|
},
|
||||||
uses: actions/upload-artifact@v1
|
"name": "Run `cargo fmt`"
|
||||||
with:
|
},
|
||||||
name: code-coverage-report
|
{
|
||||||
path: cobertura.xml
|
"uses": "actions-rs/cargo@v1",
|
||||||
|
"with": {
|
||||||
|
"command": "clippy",
|
||||||
|
"args": "-- -D warnings"
|
||||||
|
},
|
||||||
|
"name": "Run `cargo clippy`"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"coverage": {
|
||||||
|
"name": "Code Coverage",
|
||||||
|
"runs-on": "ubuntu-latest",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"uses": "actions/checkout@v2",
|
||||||
|
"name": "Checkout"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uses": "actions-rs/toolchain@v1",
|
||||||
|
"with": {
|
||||||
|
"profile": "minimal",
|
||||||
|
"toolchain": "nightly",
|
||||||
|
"override": true
|
||||||
|
},
|
||||||
|
"name": "Install Rust nightly"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Run cargo-tarpaulin",
|
||||||
|
"uses": "actions-rs/tarpaulin@v0.1",
|
||||||
|
"with": {
|
||||||
|
"version": "0.12.3",
|
||||||
|
"args": "--ignore-tests -- --test-threads 1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Upload to codecov.io",
|
||||||
|
"uses": "codecov/codecov-action@v1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Archive code coverage results",
|
||||||
|
"uses": "actions/upload-artifact@v1",
|
||||||
|
"with": {
|
||||||
|
"name": "code-coverage-report",
|
||||||
|
"path": "cobertura.xml"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,26 @@
|
||||||
name: Security audit
|
{
|
||||||
on:
|
"name": "Security audit",
|
||||||
schedule:
|
"on": {
|
||||||
- cron: '0 0 * * *'
|
"schedule": [
|
||||||
jobs:
|
{
|
||||||
audit:
|
"cron": "0 0 * * *"
|
||||||
runs-on: ubuntu-latest
|
}
|
||||||
steps:
|
]
|
||||||
- uses: actions/checkout@v1
|
},
|
||||||
- uses: actions-rs/audit-check@v1
|
"jobs": {
|
||||||
with:
|
"audit": {
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
"runs-on": "ubuntu-latest",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"uses": "actions/checkout@v1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uses": "actions-rs/audit-check@v1",
|
||||||
|
"with": {
|
||||||
|
"token": "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue