Skip to content

Commit

Permalink
use github actions (#444)
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Lee <[email protected]>
  • Loading branch information
BusyJay authored Jun 16, 2021
1 parent b90f0c9 commit aab6c01
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 44 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
pull_request:
push:
branches:
- master

env:
RUST_BACKTRACE: 1
RUSTFLAGS: "--deny=warnings"

jobs:
build_and_test:
name: Rust ${{ matrix.rust }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]
include:
- os: ubuntu-latest
rust: nightly
steps:
- uses: actions/checkout@v2
- name: setup nightly
if: ${{ matrix.rust == 'nightly' }}
run: rustup default nightly
- name: check format
if: ${{ matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' }}
run: cargo fmt --all -- --check
- name: check clippy
if: ${{ matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' }}
run: cargo clippy --all --all-targets -- -D clippy::all && cargo clippy --no-default-features --features prost-codec -- -D clippy::all
- run: cargo test --all -- --nocapture
# Validate benches still work.
- run: cargo bench --all -- --test
# Because failpoints inject failure in code path, which will affect all concurrently running tests, Hence they need to be synchronized, which make tests slow.
- run: cargo test --tests --features failpoints -- --nocapture
# TODO: There is a bug in protobuf-build that cached size is not supported yet, so do not test harness.
- run: cargo test --no-default-features --features prost-codec -- --nocapture
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

0 comments on commit aab6c01

Please sign in to comment.