feat: cherrypick #136 #45
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: read | |
concurrency: | |
group: ci-${{ github.ref }}-linting | |
cancel-in-progress: true | |
jobs: | |
rust: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Check formatting of workspace | |
working-directory: ./rust | |
run: cargo fmt -- --check | |
- name: Clippy linting on workspace (host-functions + std) | |
working-directory: ./rust | |
run: cargo clippy --tests -- -D warnings | |
- name: Clippy linting on workspace (no-std) | |
working-directory: ./rust | |
run: cargo clippy --tests --no-default-features -- -D warnings | |
- name: Clippy linting on workspace (host functions only) | |
working-directory: ./rust | |
run: cargo clippy --tests --no-default-features --features host-functions -- -D warnings | |
golangci: | |
name: golangci-lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
# ci is set to go1.19 to match developer setups | |
go-version: 1.19.2 | |
- uses: actions/checkout@v3 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | |
version: v1.50.0 | |
working-directory: go | |