Skip to content

Commit

Permalink
Enable CI by setting several configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn committed May 18, 2022
1 parent eb2e177 commit b74cdf4
Show file tree
Hide file tree
Showing 8 changed files with 219 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- C-dependency-update
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- C-dependency-update
32 changes: 32 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "ci-fmt"
on:
pull_request:
push:
branches:
- master
- main
- staging # for Bors
- trying # for Bors
jobs:
fmt:
name: fmt
runs-on: ubuntu-18.04
steps:
- name: checkout_repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal

- name: install_rustfmt
run: rustup component add rustfmt

- name: check_formatting
run: |
cargo fmt -- --check
23 changes: 23 additions & 0 deletions .github/workflows/licenses_and_advisories.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "ci-licenses_and_advisories"
on:
pull_request:
push:
branches:
- master
- main
- staging # for Bors
- trying # for Bors
jobs:
licenses_and_advisories:
name: licenses_and_advisories
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources

continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
37 changes: 37 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "ci-linter"
on:
pull_request:
push:
branches:
- master
- main
- staging # for Bors
- trying # for Bors
jobs:
linter:
name: linter
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: checkout_repo
uses: actions/checkout@v3

- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: clippy

- name: check_clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets --workspace

- name: check_clippy_no_default_features
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --no-default-features --all-targets --workspace
31 changes: 31 additions & 0 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "ci-msrv"
on:
pull_request:
push:
branches:
- master
- main
- staging # for Bors
- trying # for Bors
schedule:
- cron: '00 05 * * *'
jobs:
msrv:
name: msrv
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: checkout_repo
uses: actions/checkout@v2
- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: install_cargo_msrv
run: cargo install cargo-msrv --no-default-features
- name: version_of_cargo_msrv
run: cargo msrv --version
- name: run_cargo_msrv
run: cargo msrv --ignore-lockfile --output-format json verify -- cargo check
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "ci-test"
on:
pull_request:
push:
branches:
- master
- main
- staging # for Bors
- trying # for Bors
schedule:
- cron: '00 05 * * *'
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build: [ubuntu-stable, macos-stable, win-gnu-stable, win-msvc-stable, ubuntu-beta, ubuntu-nightly]
include:
- build: ubuntu-stable
os: ubuntu-latest
rust: stable

- build: macos-stable
os: macOS-latest
rust: stable

- build: win-gnu-stable
os: windows-latest
rust: stable-x86_64-gnu

- build: win-msvc-stable
os: windows-latest
rust: stable

- build: ubuntu-beta
os: ubuntu-latest
rust: beta

- build: ubuntu-nightly
os: ubuntu-latest
rust: nightly
steps:
- name: checkout_repository
uses: actions/checkout@v3

- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
profile: minimal

- name: fetch
run: cargo fetch --verbose

- name: build
run: cargo build --verbose

- name: test
run: cargo test --verbose

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ description = "Library focused on supporting user oriented output while supporti
license = "Apache-2.0 OR MIT"
repository = "https://github.com/foresterre/storyteller"

[package.metadata]
msrv = "1.38"

exclude = ["/.github", "docs/sketches/*.png"]

[dependencies]
Expand Down
14 changes: 14 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[licenses]
unlicensed = "deny"
copyleft = "deny"
confidence-threshold = 0.925
allow = [
"Apache-2.0",
"MIT",
]

[advisories]
vulnerability = "deny"
unmaintained = "deny"
notice = "deny"
ignore = []

0 comments on commit b74cdf4

Please sign in to comment.