diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..20e8f4e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,52 @@ +on: + push: + branches: + - '**' + +name: tests + +jobs: + clippy: + name: Actions - clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.71.0 + components: clippy + profile: minimal + override: true + - run: make clippy + + rustfmt: + name: Actions - rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.71.0 + components: rustfmt + profile: minimal + override: true + - run: make fmt + + unit-test: + name: Actions - unit test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.71.0 + profile: minimal + - run: make test + env: + RUST_BACKTRACE: 1