From 155e3a835b48910bdd1b9b9390120c97829c90e4 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Mon, 31 May 2021 09:57:57 -0700 Subject: [PATCH] ci: use GitHub ci instead of Travis --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 18 -------------- 2 files changed, 53 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..08d62a3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + - main + +env: + RUSTFLAGS: -Dwarnings + +jobs: + build_and_test: + name: Build and test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04] + rust: [stable] + + steps: + - uses: actions/checkout@master + + - name: check + run: cargo check --workspace --all-targets + + - name: tests + run: cargo test --workspace + env: + RUST_BACKTRACE: short + + clippy_fmt_docs: + name: Checking fmt, clippy, and docs + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + + - name: update clippy + run: rustup toolchain update stable + + - name: install nightly + run: rustup toolchain install nightly + + - name: clippy + run: cargo clippy --workspace --all-targets + + - name: fmt + run: cargo fmt --all -- --check + + - name: docs + run: cargo +nightly doc --no-deps diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 325827e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: rust -rust: - - nightly - -before_script: | - rustup component add rustfmt-preview; - if ! rustup component add rustfmt; then - target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustfmt`; - echo "'rustfmt' is unavailable on the toolchain 'nightly', use the toolchain 'nightly-$target' instead"; - rustup toolchain install nightly-$target; - rustup default nightly-$target; - rustup component add rustfmt; - fi -script: | - cargo fmt -- --check && - cargo build --verbose && - cargo test --verbose -cache: cargo