-
Notifications
You must be signed in to change notification settings - Fork 302
60 lines (51 loc) · 1.7 KB
/
spellchecker.yml
File metadata and controls
60 lines (51 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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:
dependency-scan:
uses: centreon/security-tools/.github/workflows/dependency-analysis.yml@main
pod-spell-check:
needs: [dependency-scan]
if: ${{ !contains(github.event.pull_request.labels.*.name, 'do-not-spellcheck') }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
base: ${{ github.ref }}
list-files: shell
filters: |
plugins:
- added|modified: 'src/**/*.pm'
- name: Install CPAN Libraries
uses: shogo82148/actions-setup-perl@9f8c263975569ff3b4e510cb1f8813115749e146 # v1.41.0
with:
perl-version: '5.34'
install-modules-with: cpm
install-modules: Test::More Test::Spelling List::MoreUtils
- name: Install librairies
continue-on-error: true
run: |
sudo apt-get update
sudo apt-get install -y hunspell
shell: bash
- name: Run spell check
id: run_check
env:
PLUGINS_FILES: ${{ steps.filter.outputs.plugins_files }}
run: |
set +e
for f in $PLUGINS_FILES; do
echo "perl .github/scripts/pod_spell_check.t $f"
output=$(perl .github/scripts/pod_spell_check.t $f)
done
shell: bash