Skip to content

ci: add workflow for formatting in CI. #31

ci: add workflow for formatting in CI.

ci: add workflow for formatting in CI. #31

Workflow file for this run

name: ci
on: [push, pull_request]
env:
RUSTFLAGS: -D warnings
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
override: true
- run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
- run: vcpkg install openssl:x64-windows-static-md
- name: Run cargo check --all
run: cargo check --all
- name: Run the tests
run: cargo test --all
- name: Run the tests with x509-parser enabled
run: cargo test --verbose --features x509-parser
- name: Run cargo doc
run: cargo doc --all --all-features
build:
strategy:
matrix:
os: [macOS-latest, ubuntu-latest]
toolchain: [stable, beta, nightly, stable 7 months ago]
exclude:
- os: macOS-latest
toolchain: beta
- os: macOS-latest
toolchain: nightly
- os: macOS-latest
toolchain: stable 7 months ago
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
override: true
- name: Run cargo check --all
run: cargo check --all
- name: Run the tests
run: cargo test --all
- name: Run the tests with x509-parser enabled
run: cargo test --verbose --features x509-parser
- name: Run cargo doc
run: cargo doc --all --all-features
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@master
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check