Beheer: zet spellcheck aan voor en-GB op het document #660
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Check | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| build: | |
| name: Build | |
| uses: Logius-standaarden/Automatisering/.github/workflows/build.yml@main | |
| check: | |
| needs: build | |
| name: Check | |
| uses: Logius-standaarden/Automatisering/.github/workflows/check.yml@main | |
| publish: | |
| needs: build | |
| name: Publish (Logius) | |
| uses: Logius-standaarden/Automatisering/.github/workflows/publish.yml@main | |
| secrets: inherit | |
| spectral_linter: | |
| name: Linter test cases | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Run test suite | |
| run: | | |
| npm install -g @stoplight/spectral-cli | |
| node linter/run-linter-tests.mjs | |
| examples_linter: | |
| needs: spectral_linter | |
| name: Examples linter tests | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| example: [ aspnet, express, golang, python, quarkus ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 21 | |
| - name: Setup .NET 9.x | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.x' | |
| - name: Setup python | |
| uses: actions/setup-python@v5 | |
| with: | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: pip install fastapi uvicorn | |
| - name: Install Spectral | |
| run: npm install -g @stoplight/spectral-cli | |
| - name: Run linter on ${{ matrix.example }} example | |
| run: ./examples/${{ matrix.example }}/build-and-check-project.sh | |
| spellchecker: | |
| name: Run spellcheck | |
| needs: build | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Recover HTML | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/static | |
| key: ${{ github.run_id }} | |
| - name: Install hunspell | |
| run: | | |
| sudo apt-get install hunspell | |
| wget -O en_GB.aff https://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_GB.aff | |
| wget -O en_GB.dic https://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_GB.dic | |
| - name: Build spellcheck version of standard | |
| run: | | |
| REPLACEMENT_REGEX="s/spellcheck: false/spellcheck: true/" | |
| sed -i "$REPLACEMENT_REGEX" js/config.mjs | |
| npx respec --localhost --src index.html --out ~/static/index.html --haltonwarn | |
| - name: Run spellcheck | |
| run: | | |
| hunspell -l -d en_GB -p standaard.dic -H ~/static/index.html | sort -u > spelling.txt | |
| [ -s spelling.txt ] && cat spelling.txt && exit 1 |