From 29c55227c079e0da3191ba09a10b0c76f5f82fff Mon Sep 17 00:00:00 2001 From: Paho Lurie-Gregg Date: Thu, 11 Mar 2021 23:31:10 -0800 Subject: [PATCH] Explore GitHub Actions instead of Travis Travis isn't building new PRs, so it seems a perfect opportunity to try something else. --- .github/workflows/check.yml | 68 +++++++++++++++++++++++++++++++++++++ .travis.yml | 50 --------------------------- 2 files changed, 68 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/check.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 000000000..3f514acd0 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,68 @@ +on: + push: + branches: + - main + pull_request: + branches: + - main + +name: CI + +jobs: + test: + name: Test Suite + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - 1.22.0 + - stable + - nightly + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + args: --verbose --features "strict" + + 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 + - uses: actions-rs/cargo@v1 + with: + command: clippy + # Allow deprecated because we test the no_std feature. + args: --all-features -- -D warnings -A deprecated diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f4334ab75..000000000 --- a/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -language: rust -rust: - - stable - - beta - - nightly - - 1.22.0 -cache: cargo -os: - - linux - - windows -matrix: - allow_failures: - - rust: nightly - fast_finish: true -branches: - only: - - main - -before_script: | - set -e - if [ $TRAVIS_RUST_VERSION == "stable" ]; then - rustup component add rustfmt-preview - rustup component add clippy - fi -script: | - set -e - if [ $TRAVIS_RUST_VERSION == "stable" ]; then - cargo fmt --all -- --check - cargo clippy -- -D warnings - cargo clippy --all-features -- -D warnings -A deprecated - fi - cargo test --verbose --features "strict" - cargo doc --features "strict" - -env: - global: - # GitHub SSH stuff - - COMMIT_AUTHOR_EMAIL: "paho@paholg.com" - # GH_TOKEN - - secure: "jEnVq9nswc2mm2A77SEI5C9ytubHrAGpMu9mqF+wr7GoaGee48LjA5OkawY3VHzreB+3djy3LO6h+JUTkKN699KRZt+RvyIBR+yY1C5O+5IwY3k5pZn/Bm4xJZfeGfRwnZ9UYl1iNEAy+yHverMcQC+Lv5wzCSRCmTa18FQpKBeYKsdXfPP1wa+PWbei3bBrO0tBxuiIA5BZUuK8QqYXluUPxKETvJxtdKgFOUbMbf4DDJ4igOrt9OZQQxKrTZWDy+5Hwv4wMh2cir3ExYuM/8dfBewxxGOty1dlZWAUAFsIJ6Ww/mhEAGtsPYjqh3tB5G5JEss2FSvLuYJcKpA9p/mf+K4tagRVF68AydjQISWVBjOarwln2+HzK9tcykfyO8fGIUNgf0ptuZETA95g3BxwKF3O0LvhGJG2QOas8Bjqpdrg3iDoT5QGy2j8DnQLL7HgM31oCvzu1BOqDn3EvRSjwWpmBpXFz/FeUoRdIX1fOZpgw3cYWTpsT/mqW+mUfO98wTHKn3QBOnskLwf9AteTmJwsdx9Kdc4e1a3BqJE/UGNZv16SnVNtun+zMQ3P84HplvCIXL5k2pUDAUpDQne9nxmZ5ADpQJQluDosA5ydtbl+Z6x2o+zGrBOlo1vxoL/x4uuAFYyiwh1DUGyNgN9x2m1A3WtqqzXX5H4XwZ0=" - # CRATESIO_TOKEN - - secure: "cchJKaN5hM2ceBpLqDokhUWFUyFubTlrUxj8d/5JjDXOxVvpZQWQuPxihnSyz0U+GSY4HwUh8C9+jRe2i8UBmhS6pPMG4Bl0Xo2T1HU9ilWb43vSqsbg77UgQ2SELNd+7g1xSI/UTsaFH0YlTOw7DsF6plruVduyOy8C44Ox1nAo4hIgN1ThRs9nhKTWydREr2zRQ/7n4c99RnPQz54ITnrHx/Ks2bvy3zgTOP7CeiQQJKh521U5tuH23r48eljje7776UA4Jbs2j1LsnMaBsraadIzNMopEwaSE1oNLOobfWG9YzvyTZ2i4yElDX4A7tscwo631Ig5AUH2+QbvN2k0q2EKETQJ9Mov5OSmK3aeMSW1GA3hQ44Uvz0F7SZru8D84sKgfSXNbfck1hTVfBPPOpmUIKDb+rSthulYq2SW2XG9cpVXrJmhYD2WTNKEuSmw7imVbTCPS03dbbMoLchpmOBkcgLtcMNDyC94xdZYSkyz9+RCG0bEfwIu9oG7o6gv+8a42pgVSP8mfOOq0+MELHntIqumlmTO0jGGH10Prs4Pgs8eVn6S84w+oz8yrbYroVaqrI2TZl73KnOmvAlnYZdCSIBGV5XsTukzochfwgaTKWI2h2iK1yt6k5I5ZgOoVlTUPB4ElwhIDfgYhc7fltHd53EO81GHGDPSI49M=" -deploy: - provider: cargo - token: $CRATESIO_TOKEN - on: - tags: true -notifications: - email: - recipients: paho@paholg.com