From 1c461edd91f3be53cd2b5b89f86dcbcaa224bcfd Mon Sep 17 00:00:00 2001 From: Bryan Lee <38807139+liby@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:31:48 +0800 Subject: [PATCH] ci: add typo check - credits to @liby for this commit --- .github/workflows/typo-check.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/typo-check.yml diff --git a/.github/workflows/typo-check.yml b/.github/workflows/typo-check.yml new file mode 100644 index 0000000..84e6eca --- /dev/null +++ b/.github/workflows/typo-check.yml @@ -0,0 +1,21 @@ +name: Typo Check +on: [pull_request] + +jobs: + typo-check: + runs-on: ubuntu-latest + timeout-minutes: 10 + env: + FORCE_COLOR: 1 + TYPOS_VERSION: v1.19.0 + steps: + - name: download typos + run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin + + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: check typos + run: typos