Skip to content

Commit

Permalink
Merge pull request #46 from Hoverbear/expanded-actions
Browse files Browse the repository at this point in the history
Expanded actions
  • Loading branch information
Hoverbear committed Nov 22, 2019
2 parents f52d479 + ecaac33 commit 5e2fe1b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 46 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: Audit
name: audit

on:
schedule:
- cron: '0 0 * * *'
push:

jobs:
Audit:
runs-on: windows-latest
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache target
id: cache-target
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-audit-target-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
84 changes: 41 additions & 43 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,46 @@
name: Test
name: test

on:
push:

jobs:
Mac:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: -- --nocapture
env:
RUSTFLAGS: "--deny=warnings"

Windows:
runs-on: windows-latest
jobs:
test:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
rust: [stable, nightly]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v1
- name: Cache target
id: cache-target
uses: actions/cache@v1
with:
toolchain: stable
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: -- --nocapture

Ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
path: target
key: ${{ runner.os }}-${{ matrix.rust }}-test-target-${{ hashFiles('**/Cargo.toml') }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: ${{ matrix.rust }}
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: -- --nocapture

Clippy:
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v1
- name: Cache target
id: cache-target
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-clippy-target-${{ hashFiles('**/Cargo.toml') }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -63,11 +50,16 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

Format:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/checkout@v1
- name: Cache target
id: cache-target
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-format-target-${{ hashFiles('**/Cargo.toml') }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -78,10 +70,16 @@ jobs:
command: fmt
args: -- --check

Coverage:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache target
id: cache-target
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-coverage-target-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
Expand All @@ -101,4 +99,4 @@ jobs:
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: /tmp/lcov.info
path-to-lcov: /tmp/lcov.info

0 comments on commit 5e2fe1b

Please sign in to comment.