From ee9fa4cdd507e5c3d8a637f3907a67631c190b02 Mon Sep 17 00:00:00 2001 From: teymour-aldridge Date: Sat, 29 May 2021 09:02:34 +0100 Subject: [PATCH] Add Github Actions CI workflow. From what I understand, TravisCI no longer offer CI for open source projects without jumping through a lot of hoops to obtain free credits. --- .github/workflows/test.yml | 41 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 10 ---------- 2 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..d759f7b5 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,41 @@ +name: Tests + +on: + pull_request: + push: + branches: + - "master" + +jobs: + format_and_lint: + name: Format and lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install latest nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v1 + - name: Check formating + run: cargo fmt -- --check + - name: Lint + run: cargo clippy -- -D warnings + test: + runs-on: ubuntu-latest + strategy: + matrix: + rust_version: [1.36.0, stable, beta, nightly] + fail-fast: false + steps: + - uses: actions/checkout@v2 + - name: Install latest nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{matrix.rust_version}} + override: true + - uses: Swatinem/rust-cache@v1 + - name: Test + run: cargo test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d95c0597..00000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: rust -rust: - - stable - - beta - - nightly - - 1.36.0 - -matrix: - allow_failures: - - rust: nightly