Skip to content

[pull] main from oasisprotocol:main #328

[pull] main from oasisprotocol:main

[pull] main from oasisprotocol:main #328

Workflow file for this run

# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: ci-lint
# Trigger the workflow when:
on:
# A push occurs to one of the matched branches.
push:
branches:
- main
- stable/*
# Or when a pull request event occurs for a pull request against one of the
# matched branches.
pull_request:
branches:
- main
- stable/*
# Cancel in-progress jobs on same branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-rust:
name: lint-rust
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
run: rustup show
- name: Lint Rust code
uses: ./.github/actions/lint-rust
with:
features: debug-logging,debug-mock-sgx,test,unsafe-allow-debug
token: ${{ secrets.GITHUB_TOKEN }}
- name: Lint Rust code (TDX)
uses: ./.github/actions/lint-rust
with:
features: tdx
token: ${{ secrets.GITHUB_TOKEN }}
- name: Lint Hello contract code
uses: ./.github/actions/lint-rust
with:
token: ${{ secrets.GITHUB_TOKEN }}
manifest_path: tests/contracts/hello/Cargo.toml
- name: Lint OAS-20 contract code
uses: ./.github/actions/lint-rust
with:
token: ${{ secrets.GITHUB_TOKEN }}
manifest_path: contract-sdk/specs/token/oas20/Cargo.toml
lint-go-client-sdk:
name: lint-go-client-sdk
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22.x"
- name: Lint Go client-sdk
uses: golangci/[email protected]
with:
# NOTE: The version must be specified without the patch version.
version: v1.54.2
working-directory: client-sdk/go
lint-go-tests-e2e:
name: lint-go-tests-e2e
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install libseccomp-dev
run: |
sudo apt-get update
sudo apt-get install libseccomp-dev
- name: Create mock contract files for lint
run: |
touch tests/e2e/contracts/build/hello.wasm
touch tests/e2e/contracts/build/oas20.wasm
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22.x"
- name: Lint E2E tests
uses: golangci/[email protected]
with:
# NOTE: The version must be specified without the patch version.
version: v1.56.1
working-directory: tests/e2e
lint-go-reflect:
name: lint-go-reflect
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22.x"
- name: Lint reflect-go
uses: golangci/[email protected]
with:
# NOTE: The version must be specified without the patch version.
version: v1.56.1
working-directory: client-sdk/ts-web/core/reflect-go
lint-ts-web:
name: lint-ts-web
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js LTS
uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: npm
cache-dependency-path: 'client-sdk/ts-web/package-lock.json'
- name: Install dependencies and build
working-directory: client-sdk/ts-web
run: npm ci --foreground-scripts
- name: Lint ts-web/core
working-directory: client-sdk/ts-web/core
run: npm run-script lint
- name: Lint ts-web/ext-utils
working-directory: client-sdk/ts-web/ext-utils
run: npm run-script lint
- name: Lint ts-web/signer-ledger
working-directory: client-sdk/ts-web/signer-ledger
run: npm run-script lint
- name: Lint ts-web/rt
working-directory: client-sdk/ts-web/rt
run: npm run-script lint
lint-markdown:
name: lint-markdown
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Lint markdown
uses: nosborn/[email protected]
with:
files: docs