Skip to content

Commit

Permalink
ci: use a single worflow for test, lint, format and docs (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen authored Nov 29, 2023
1 parent 0f971c1 commit 92e3bf0
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 73 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths-ignore:
- '**/*.md'
push:
branches:
- main
paths-ignore:
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
- run: cargo test

format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
components: rustfmt
- run: cargo fmt -- --check

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
components: clippy
- run: cargo check
- run: cargo clippy -- -D warnings

docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
components: rust-docs
- run: RUSTDOCFLAGS='-D warnings' cargo doc
42 changes: 0 additions & 42 deletions .github/workflows/Lint.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/Test.yaml

This file was deleted.

0 comments on commit 92e3bf0

Please sign in to comment.