From 77ad07e34726c90cb83680d086940bcf0e497e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= Date: Tue, 27 Jul 2021 13:59:16 +0200 Subject: [PATCH] Add github actions (#160) * Add github actions * s/toolchains/toolchain * s/test/build * Remove no longer need travis --- .github/workflows/check.yml | 55 +++++++++++++++++++++++++++++++++++++ .travis.yml | 8 ------ 2 files changed, 55 insertions(+), 8 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 0000000..a0abbba --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,55 @@ +name: Check + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + strategy: + matrix: + os: ["ubuntu-latest", "macos-latest"] + toolchain: ["stable", "nightly"] + runs-on: ${{ matrix.os }} + steps: + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + target: wasm32-unknown-unknown + toolchain: ${{ matrix.toolchain }} + components: clippy, rustfmt + + - uses: actions/checkout@v2 + + - name: Build + uses: actions-rs/cargo@v1 + with: + toolchain: ${{ matrix.toolchain }} + command: build + + - name: Build no_std + uses: actions-rs/cargo@v1 + with: + toolchain: ${{ matrix.toolchain }} + command: build + args: --no-default-features + + - name: Build wasm + uses: actions-rs/cargo@v1 + with: + toolchain: ${{ matrix.toolchain }} + command: build + args: --no-default-features --target wasm32-unknown-unknown + + - name: Test + uses: actions-rs/cargo@v1 + with: + toolchain: ${{ matrix.toolchain }} + command: test + args: --all-features diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a64db76..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: rust -dist: focal -rust: - - nightly - - stable -script: - - cargo test --all-features --verbose - - cargo build --no-default-features --verbose