feat: 支持ts-checker #801
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
types: [opened, synchronize] | |
paths-ignore: | |
- '**/*.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: ${{ github.ref_name != 'master' }} | |
jobs: | |
test: | |
name: Test | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
if: ${{ !startsWith(github.event.head_commit.message, 'release:') && !startsWith(github.event.head_commit.message, 'ci:') && !startsWith(github.event.head_commit.message, 'docs:') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust Toolchain | |
uses: ./.github/actions/rustup | |
with: | |
clippy: true | |
save-cache: ${{ github.ref_name == 'master' }} | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "pnpm" | |
token: ${{ secrets.GH_DOTCOM_TOKEN }} | |
- run: pnpm i --no-lockfile | |
- name: Install cargo-nextest | |
uses: taiki-e/install-action@cargo-nextest | |
- name: Test | |
shell: bash | |
run: cargo nextest run | |
lint: | |
name: Clippy | |
runs-on: ubuntu-latest | |
if: ${{ !startsWith(github.event.head_commit.message, 'release:') && !startsWith(github.event.head_commit.message, 'ci:') && !startsWith(github.event.head_commit.message, 'docs:') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust Toolchain | |
uses: ./.github/actions/rustup | |
with: | |
clippy: true | |
restore-cache: false | |
- name: Clippy | |
run: cargo clippy --locked -- -D warnings | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
if: ${{ !startsWith(github.event.head_commit.message, 'release:') && !startsWith(github.event.head_commit.message, 'ci:') && !startsWith(github.event.head_commit.message, 'docs:') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: ./.github/actions/rustup | |
with: | |
fmt: true | |
restore-cache: false | |
- run: cargo fmt --all -- --check | |
- name: Install Taplo CLI | |
uses: ./.github/actions/binstall | |
with: | |
packages: [email protected] | |
- run: taplo format --check | |
typos: | |
name: Spell Check | |
runs-on: ubuntu-latest | |
if: ${{ !startsWith(github.event.head_commit.message, 'release:') && !startsWith(github.event.head_commit.message, 'ci:') && !startsWith(github.event.head_commit.message, 'docs:') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: crate-ci/[email protected] | |
with: | |
files: . |