]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify typos workflow. 17570/head
authorMarc Fehling <mafehling.git@gmail.com>
Mon, 19 Aug 2024 22:14:48 +0000 (16:14 -0600)
committerMarc Fehling <mafehling.git@gmail.com>
Mon, 19 Aug 2024 22:15:51 +0000 (16:15 -0600)
.github/dependabot.yml
.github/workflows/indent.yml
.github/workflows/typos.yml [deleted file]

index dfd0e3086189506703f5c1ef4bd9391b15b256c9..704970492f902b948d9e1250478bf4907c7e1f1d 100644 (file)
@@ -8,3 +8,5 @@ updates:
     schedule:
       # Check for updates to GitHub Actions every week
       interval: "weekly"
+    ignore:
+    - dependency-name: "crate-ci/typos"
index 9dc01bace38689b5a6ecc7e7fe8f04afad406787..4e2a7d34e459769ea4241578cd1e9d8fb1b1e523 100644 (file)
@@ -71,3 +71,16 @@ jobs:
       with:
         name: doxygen_documentation.tar.gz
         path: doxygen_documentation.tar.gz
+
+  typos:
+    # check for typos
+
+    name: typos
+    runs-on: [ubuntu-22.04]
+
+    steps:
+    - uses: actions/checkout@v4
+    - uses: crate-ci/typos@v1.19.0
+      with:
+        files: doc examples include source tests
+        config: ./.typos.toml
diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml
deleted file mode 100644 (file)
index 78ea1d3..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-name: Spell Check with Typos
-on:
-  push:
-    branches:
-      - 'master'
-  pull_request:
-
-concurrency:
-  group: ${{ github.actor }}-${{ github.ref }}-typos
-  cancel-in-progress: true
-
-permissions: write-all
-
-jobs:
-  typos-check:
-    name: Check for new typos
-    runs-on: ubuntu-latest
-    timeout-minutes: 5
-    steps:
-      - name: Checkout the Checkout Actions Repository
-        uses: actions/checkout@v4
-        with:
-          persist-credentials: false
-      - name: Check spelling with typos
-        env:
-          GH_TOKEN: "${{ github.token }}"
-        run: |
-          mkdir -p "${{ runner.temp }}/typos"
-          wget --secure-protocol=TLSv1_3 --max-redirect=1 --retry-on-host-error --retry-connrefused --tries=3 \
-            --quiet --output-document=- "https://github.com/crate-ci/typos/releases/download/v1.19.0/typos-v1.19.0-x86_64-unknown-linux-musl.tar.gz" \
-            | tar -xz -C "${{ runner.temp }}/typos" ./typos
-          "${{ runner.temp }}/typos/typos" --version
-
-          "${{ runner.temp }}/typos/typos" --config .typos.toml --format json doc examples include source tests >> ${{ runner.temp }}/typos.jsonl || true
-      - name: Update repo with fixable typos
-        uses: crate-ci/typos@v1.23.6
-        with:
-          write_changes: true
-          config: ./.typos.toml
-          files: doc examples include source tests
-      - name: Store typos diff file
-        run:  git diff > changes-typos.diff
-      - name: archive typos results
-        uses: actions/upload-artifact@v4
-        with:
-          name: changes-typos.diff
-          path: changes-typos.diff
-      - name: Report typos as warnings
-        run: |
-          python -c '
-          import sys, json
-          old = set()
-          clean = True
-          with open(sys.argv[1]) as file:
-            for line in file:
-              new = json.loads(line)
-              if new["type"] == "typo":
-                clean = False
-                print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format(
-                  new["path"], new["line_num"], new["byte_offset"],
-                  new["typo"], " or ".join(new["corrections"])))
-          sys.exit(1 if not clean else 0)' "${{ runner.temp }}/typos.jsonl"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.