Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CTOR-179] Include orthograph/syntax checks in CI for MC documentation #4788

Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
75ddaab
Add pod_spell_check test and githubaction
Dec 21, 2023
c67fc0e
wip
Dec 21, 2023
f630da4
wip
Dec 21, 2023
2c005e8
add fake plugins change
Dec 21, 2023
1781c6d
wip
Dec 21, 2023
03eede1
wip
Dec 21, 2023
2684022
wip
Dec 21, 2023
ee3d6b2
wip
Dec 21, 2023
c4f44f0
wip
Dec 21, 2023
2708fdc
test to have all the errors
sdepassio Dec 21, 2023
455dc1b
update
sdepassio Dec 21, 2023
01f2815
fix
sdepassio Dec 21, 2023
935003c
update for all errors
sdepassio Dec 21, 2023
9b9b7c0
update
sdepassio Dec 21, 2023
504182d
workflow ok
sdepassio Dec 21, 2023
1786a1b
Remove corrupted files
Dec 22, 2023
a18c2e8
Cpu changes
Dec 22, 2023
41d5618
Test ok check
Dec 22, 2023
b06d9eb
Test ok check
Dec 22, 2023
2d5a96f
Test ok check
Dec 22, 2023
a499b05
Test ok check
Dec 22, 2023
309bb34
Only keep test
Dec 22, 2023
ad558d8
Update .github/workflows/spellchecker.yml
lucie-dubrunfaut Dec 22, 2023
4eab96e
Improvements after doc team brefing
Jan 16, 2024
dd5d5e3
Wip
Jan 16, 2024
027c417
Add a way to bypass the spellcheck in PR if needed using tag
Jan 17, 2024
e07099a
skip ga for "do-not-spell-check" label
sdepassio Jan 17, 2024
ae7bf35
fix
sdepassio Jan 17, 2024
91dc663
test
sdepassio Jan 17, 2024
cf2143a
update github actions versions
sdepassio Jan 17, 2024
ee058ac
fix: use pull_request event instead of issue
sdepassio Jan 17, 2024
8f0ae7b
test
sdepassio Jan 17, 2024
9e1b373
Remove trashs
Jan 18, 2024
e9ec918
Merge branch 'CTOR-179-include-orthograph-syntax-checks-in-ci-for-mc-…
Jan 18, 2024
d474fc6
Handle with stopword path
Jan 18, 2024
b215026
Update stopwords.t
Jan 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/scripts/pod_spell_check.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use strict;
use warnings;
use Test::More;

use Test::Spelling;
use Pod::Wordlist;

add_stopwords(<DATA>);
set_spell_cmd('hunspell -L'); # current preferred
# set_spell_cmd('aspell list');
# set_spell_cmd('spell');
# set_spell_cmd('ispell -l');
my $cmd = has_working_spellchecker;
printf($cmd."\n");
all_pod_files_spelling_ok( $ARGV[0]);

__DATA__
SNMP
SSH
53 changes: 53 additions & 0 deletions .github/workflows/spellchecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: spell-checker

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/spellchecker.yml'
- 'src/**'
- '.github/scripts/pod_spell_check.t'

jobs:
pod-spell-check:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.ref }}
list-files: shell
filters: |
plugins:
- added|modified: src/**

- name: Install CPAN Libraries
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.34'
install-modules-with: cpm
install-modules: Test::More Test::Spelling Pod::Wordlist

- name: Install librairies
continue-on-error: true
run: |
sudo apt-get update
sudo apt-get install -y hunspell aspell spell ispell
shell: bash

- name: Run spell check
id: run_check
run: |
set +e
for f in ${{ steps.filter.outputs.plugins_files }}; do
echo "perl .github/scripts/pod_spell_check.t $f"
output=$(perl .github/scripts/pod_spell_check.t $f)
done
shell: bash
Loading