From d09f40887cca426ec24d14840c2880844e8a92da Mon Sep 17 00:00:00 2001 From: Simon Johnston Date: Wed, 28 Oct 2020 11:24:09 -0700 Subject: [PATCH] Add files via upload --- .github/workflows/cargo-audit.yml | 15 ++++++++++++ .github/workflows/rust.yml | 38 ++++++++++++++++++------------- 2 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/cargo-audit.yml diff --git a/.github/workflows/cargo-audit.yml b/.github/workflows/cargo-audit.yml new file mode 100644 index 0000000..da80c16 --- /dev/null +++ b/.github/workflows/cargo-audit.yml @@ -0,0 +1,15 @@ +name: Security audit +on: + push: + paths: + - '**/Cargo.toml' + - '**/Cargo.lock' +jobs: + security_audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5e41a03..85aa9f3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,24 +1,30 @@ name: Rust -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -env: - CARGO_TERM_COLOR: always +on: [push] jobs: build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose - - name: Document - run: cargo doc --verbose --no-deps + - uses: actions/checkout@v1 + + - name: Install dependencies + run: rustup component add rustfmt + + - name: Format + run: cargo fmt -- --check + + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --all-features --verbose + + - name: Docs + run: cargo doc --no-deps +