Skip to content

Commit

Permalink
ci: initial github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian committed Jan 13, 2020
1 parent b679b5e commit 0f2f856
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflow/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Baseon on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md

on: [push, pull_request]

name: Continuous integration

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2

- name: Rust toolchain
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Check
- uses: actions-rs/cargo@v1
with:
command: check

test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macOS-latest
steps:
- name: Checkout
- uses: actions/checkout@v2

- name: Rust toolchain
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Check
- uses: actions-rs/cargo@v1
with:
command: test

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

0 comments on commit 0f2f856

Please sign in to comment.