on: [push, pull_request]
name: CI
jobs:
rustfmt:
name: ☢️ Formatting ☢️
runs-on: ubuntu-latest
steps:
- name: ✔️ Checkout ✔️
uses: actions/checkout@v2
- name: 🧰 Toolchain 🧰
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- run: cargo fmt --all -- --check
lints:
name: 🕳️ Lints 🕳️
needs: rustfmt
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: ✔️ Checkout ✔️
uses: actions/checkout@v2
- name: 🧰 Toolchain 🧰
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- run: cargo clippy --all -- -D warnings
test:
name: slog-try
needs: lints
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
rust: stable
other: i686-unknown-linux-gnu
- os: ubuntu-latest
rust: stable
other: x86_64-unknown-linux-gnu
- os: ubuntu-latest
rust: beta
other: i686-unknown-linux-gnu
- os: ubuntu-latest
rust: beta
other: x86_64-unknown-linux-gnu
- os: ubuntu-latest
rust: nightly
other: i686-unknown-linux-gnu
- os: ubuntu-latest
rust: nightly
other: x86_64-unknown-linux-gnu
- os: macos-latest
rust: stable
other: x86_64-apple-darwin
- os: macos-latest
rust: stable
other: x86_64-apple-ios
- os: macos-latest
rust: beta
other: x86_64-apple-darwin
- os: macos-latest
rust: beta
other: x86_64-apple-ios
- os: macos-latest
rust: nightly
other: x86_64-apple-darwin
- os: macos-latest
rust: nightly
other: x86_64-apple-ios
- os: windows-latest
rust: stable-msvc
other: i686-pc-windows-msvc
- os: windows-latest
rust: stable-msvc
other: x86_64-pc-windows-msvc
- os: windows-latest
rust: beta-msvc
other: i686-pc-windows-msvc
- os: windows-latest
rust: beta-msvc
other: x86_64-pc-windows-msvc
- os: windows-latest
rust: nightly-msvc
other: i686-pc-windows-msvc
- os: windows-latest
rust: nightly-msvc
other: x86_64-pc-windows-msvc
- os: windows-latest
rust: stable-gnu
other: i686-pc-windows-gnu
- os: windows-latest
rust: stable-gnu
other: x86_64-pc-windows-gnu
- os: windows-latest
rust: beta-gnu
other: i686-pc-windows-gnu
- os: windows-latest
rust: beta-gnu
other: x86_64-pc-windows-gnu
- os: windows-latest
rust: nightly-gnu
other: i686-pc-windows-gnu
- os: windows-latest
rust: nightly-gnu
other: x86_64-pc-windows-gnu
steps:
- name: ✔️ Checkout ✔️
uses: actions/checkout@v2
- name: 💵 Cache 💵
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/cargo-tarpaulin*
~/.cargo/bin/cargo-*-all-features*
key: ${{ runner.os }}-${{ matrix.rust }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
name: 🧰 Toolchain 🧰
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: 💾 Install (cargo-tarpaulin) 💾
uses: actions-rs/install@v0.1
if: matrix.os == 'ubuntu-latest'
with:
crate: cargo-tarpaulin
version: latest
use-tool-cache: true
continue-on-error: true
- name: 💾 Install (cargo-all-features) 💾
uses: actions-rs/install@v0.1
with:
crate: cargo-all-features
version: latest
use-tool-cache: true
continue-on-error: true
- name: 🧪 Test 🧪
run: cargo test-all-features
- name: 🙊 Code Coverage 🙊
if: matrix.os == 'ubuntu-latest'
run: cargo tarpaulin --out Xml
- name: 🙊 Upload Code Coverage 🙊
uses: codecov/codecov-action@v1
if: matrix.os == 'ubuntu-latest'
with:
files: ./cobertura.xml