From e2e565c8895a489fbe530cad14fae63c673cd337 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Fri, 6 Dec 2024 20:02:04 -0800 Subject: [PATCH] split typo checker out so it runs against markdown --- .github/workflows/main.yml | 28 ------------------------- .github/workflows/typos.yml | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/typos.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 65db45866..8887f2d54 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -123,15 +123,6 @@ jobs: cache-all-crates: "true" - run: cargo fmt --all -- --check - typos: - if: github.event.pull_request.draft == false - name: Check for typos - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Check for typos - uses: crate-ci/typos@master - docs: if: github.event.pull_request.draft == false name: Docs @@ -157,25 +148,6 @@ jobs: # RUSTDOCFLAGS: --cfg docsrs -Dwarnings # --document-private-items - # Check for invalid links in the repository - link-check: - if: github.event.pull_request.draft == false - name: Check For Invalid Links - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Restore lychee cache - uses: actions/cache@v4 - with: - path: .lycheecache - key: cache-lychee-${{ github.sha }} - restore-keys: cache-lychee- - - name: Run lychee - uses: lycheeverse/lychee-action@v2 - with: - args: --base . --config ./lychee.toml './**/*.md' - fail: true - check: if: github.event.pull_request.draft == false name: Check diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 000000000..b16f9ae7d --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,42 @@ +# Whenever an open PR is updated, the workflow will be triggered + +name: Language Linting + +on: + push: + branches: + - main + + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + branches: + - main + +jobs: + typos: + if: github.event.pull_request.draft == false + name: Check for typos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check for typos + uses: crate-ci/typos@master + + # Check for invalid links in the repository + link-check: + if: github.event.pull_request.draft == false + name: Check For Invalid Links + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Restore lychee cache + uses: actions/cache@v4 + with: + path: .lycheecache + key: cache-lychee-${{ github.sha }} + restore-keys: cache-lychee- + - name: Run lychee + uses: lycheeverse/lychee-action@v2 + with: + args: --base . --config ./lychee.toml './**/*.md' + fail: true