Skip to content

Commit

Permalink
Update CI - separate misspell, use re-usable action
Browse files Browse the repository at this point in the history
Update the actions/checkout on the shellcheck. Install shellcheck
before trying to use. Use the client runners.
  • Loading branch information
JanneKiiskila committed Oct 15, 2024
1 parent 320649a commit 23f6211
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/misspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Misspell
on:
push:
workflow_dispatch:

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: perts-misspell-'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
misspell:
runs-on: client
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Remove folders we do not want to check (as we do not control them)
run: rm -rf node_modules vendor-licenses.txt
- name: Misspell
uses: PelionIoT/actions/.github/actions/misspell@main
with:
exceptions: "mosquitto"
23 changes: 3 additions & 20 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,9 @@ concurrency:
cancel-in-progress: true
jobs:
run-shellcheck:
runs-on: ubuntu-22.04
runs-on: client
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: sudo apt-get update && sudo apt-get install -y shellcheck
- run: shellcheck --version
- run: shellcheck scripts/*.sh
run-misspell:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Run misspell
run: |
curl -L -o ./install-misspell.sh https://git.io/misspell
sh ./install-misspell.sh
bin/misspell -i mosquitto,Stichting,Mathematisch scripts test_cases test-configs utils conf >misspell.log
echo "### misspell" >>$SUMMARY_FILE
cat misspell.log >>$SUMMARY_FILE
bin/misspell -error -i mosquitto .
lines=$(wc -l < "misspell.log")
if [[ $lines -gt 0 ]]; then
echo "Misspell has findings, fail."
echo "TEST_FAIL=true" >> $GITHUB_ENV
exit 1
fi

0 comments on commit 23f6211

Please sign in to comment.