Skip to content

Commit

Permalink
Merge #59
Browse files Browse the repository at this point in the history
59: Switch to github actions r=Nemo157 a=Nemo157



Co-authored-by: Wim Looman <git@nemo157.com>
  • Loading branch information
bors[bot] and Nemo157 authored Nov 5, 2020
2 parents 372020c + d953c8a commit ee0dd69
Show file tree
Hide file tree
Showing 12 changed files with 1,196 additions and 47 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: audit

env:
RUST_BACKTRACE: 1

jobs:
audit:
name: cargo audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

on:
push:
branches: [staging, trying]
pull_request:
branches: [master]
22 changes: 22 additions & 0 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: base

env:
RUST_BACKTRACE: 1

jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --locked --all-features

on:
push:
branches: [staging, trying]
pull_request:
branches: [master]
30 changes: 30 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: coverage

env:
RUST_BACKTRACE: 1

jobs:
codecov:
name: codecov
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/tarpaulin@v0.1
with:
args:
--locked
--all-features
--
--skip 'proptest::'
- uses: codecov/codecov-action@v1

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 0 * * 5'
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: docs

env:
RUST_BACKTRACE: 1

jobs:
docsrs:
name: cargo doc --cfg docsrs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
- uses: actions-rs/cargo@v1
with:
command: rustdoc
toolchain: nightly
args: --all-features --locked -- --cfg=docsrs -Dwarnings

on:
push:
branches: [staging, trying]
83 changes: 83 additions & 0 deletions .github/workflows/exhaustive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: exhaustive

env:
RUST_BACKTRACE: 1

jobs:
test:
name: cargo test
strategy:
matrix:
platform:
- { toolchain: stable, target: i686-pc-windows-msvc, os: windows-latest }
- { toolchain: stable, target: i686-unknown-linux-gnu, os: ubuntu-latest }
- { toolchain: stable, target: x86_64-apple-darwin, os: macos-latest }
- { toolchain: stable, target: x86_64-pc-windows-msvc, os: windows-latest }
- { toolchain: stable, target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.platform.toolchain }}
targets: ${{ matrix.platform.target }}
- uses: actions-rs/cargo@v1
with:
toolchain: ${{ matrix.platform.toolchain }}
command: test
args: --workspace --locked --all-features

min-versions:
name: cargo test --shallow-minimal-versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
- name: Update to shallow minimal versions
run:
cargo update $(
cargo metadata --all-features --format-version 1
| jq -r '
. as $root
| .resolve.nodes[]
| select(.id == $root.resolve.root)
| .deps[].pkg
| . as $dep
| $root.packages[]
| select(.id == $dep)
| "-p", "\(.name):\(.version)"
'
) -Z minimal-versions
- uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --locked --all-features
check-features:
name: cargo hack check --feature-powerset
runs-on: ubuntu-latest
env:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
- uses: actions-rs/cargo@v1
with:
command: install
args: cargo-hack
- uses: actions-rs/cargo@v1
with:
command: hack
args: check
--workspace
--feature-powerset
--no-dev-deps
on:
push:
branches: [staging, trying]
35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: lint

env:
RUST_BACKTRACE: 1

jobs:
fmt:
name: cargo fmt --check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with: { components: rustfmt }
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check

clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with: { components: clippy }
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets --all-features --locked -- -D warnings

on:
push:
branches: [staging, trying]
pull_request:
branches: [master]
53 changes: 53 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: nightly

env:
RUST_BACKTRACE: 1

jobs:
test:
name: cargo +nightly test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
- uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: test
args: --workspace --locked --all-features

fmt:
name: cargo +nightly fmt --check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
components: rustfmt
- uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: fmt
args: -- --check

clippy:
name: cargo +nightly clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
components: rustfmt
- uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: clippy
args: --workspace --all-targets --all-features --locked -- -D warnings

on:
schedule:
- cron: '0 2 * * *'
26 changes: 26 additions & 0 deletions .github/workflows/updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: updates

env:
RUST_BACKTRACE: 1

jobs:
update:
name: cargo build --update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
- uses: actions-rs/cargo@v1
with:
command: update
args: --aggressive
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --locked --all-features

on:
push:
branches: [staging, trying]
schedule:
- cron: '0 0 * * 5'
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
target
Cargo.lock

.idea/
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit ee0dd69

Please sign in to comment.