diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..b33d4bb --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,53 @@ +on: + push: + branches: + - "main" + pull_request: + +name: check +jobs: + fmt: + runs-on: ubuntu-latest + name: Check + permissions: + checks: write + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: rustfmt + - name: cargo fmt --check + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --check + - name: cargo clippy + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + test: + runs-on: ubuntu-latest + name: Run test suite + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Install nightly + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + default: true + - name: cargo test + uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features + - name: Run abort tests + run: ./abort_tests.sh diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..7f27793 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,19 @@ +on: + release: + types: [published] + workflow_dispatch: + +name: publish +jobs: + publish: + runs-on: ubuntu-latest + name: Publish + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: katyo/publish-crates@v1 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}