Add github actions (#160)

* Add github actions

* s/toolchains/toolchain

* s/test/build

* Remove no longer need travis
This commit is contained in:
Alexander Theißen
2021-07-27 13:59:16 +02:00
committed by GitHub
parent c5043a47ac
commit 77ad07e347
2 changed files with 55 additions and 8 deletions
+55
View File
@@ -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