diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..41a4755 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,17 @@ +on: push +name: lint checks +jobs: + rust_lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: rustup component add clippy + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features + rust_format_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: cargo fmt --all --check diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ed71c7d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: test +on: + push: + branches: + - "main" + pull_request: + branches: + - "*" +jobs: + test: + name: run tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Rust + run: rustup toolchain install stable --component llvm-tools-preview + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Generate code coverage + run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: lcov.info + fail_ci_if_error: true