forked from AFPy/python-docs-fr
Github checks only changed files (#1500)
This commit is contained in:
parent
02264afd6e
commit
4975c6872c
|
@ -11,49 +11,49 @@ on:
|
||||||
- '*.*'
|
- '*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pospell:
|
checks:
|
||||||
name: 'Orthographe (pospell)'
|
strategy:
|
||||||
|
matrix:
|
||||||
|
tool:
|
||||||
|
- name: Orthographe
|
||||||
|
package: pospell
|
||||||
|
apt_dependencies: hunspell hunspell-fr-comprehensive
|
||||||
|
command: pospell -p dict -l fr_FR
|
||||||
|
- name: Longueur des lignes
|
||||||
|
package: powrap
|
||||||
|
apt_dependencies: gettext
|
||||||
|
command: powrap --check --quiet --diff
|
||||||
|
- name: Grammaire
|
||||||
|
package: padpo
|
||||||
|
command: 'padpo -i 2>&1'
|
||||||
|
command_suffix: '| grep -v -Ff padpo.ignore'
|
||||||
|
|
||||||
|
name: ${{ matrix.tool.name }} (${{ matrix.tool.package }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Register pospell problem matcher
|
- name: Register problem matchers
|
||||||
run: echo "::add-matcher::.github/problem-matchers/pospell.json"
|
run: echo "::add-matcher::.github/problem-matchers/pospell.json"
|
||||||
- name: Install pospell
|
- uses: lots0logs/gh-action-get-changed-files@2.1.4
|
||||||
run: |
|
id: changed_files
|
||||||
sudo apt-get update
|
with:
|
||||||
sudo apt-get install -y hunspell hunspell-fr-comprehensive
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
sudo python3 -m pip install pospell
|
|
||||||
- name: Run pospell
|
|
||||||
run: pospell -p dict -l fr_FR *.po */*.po
|
|
||||||
|
|
||||||
powrap:
|
|
||||||
name: 'Longueur des lignes (powrap)'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install powrap
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install gettext
|
|
||||||
sudo python3 -m pip install powrap
|
|
||||||
- name: Run powrap
|
|
||||||
run: powrap --check --quiet *.po */*.po
|
|
||||||
|
|
||||||
padpo:
|
|
||||||
name: 'Grammaire (padpo)'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: '3.9'
|
||||||
- name: Install padpo
|
- name: Install ${{ matrix.tool.package }}
|
||||||
run: |
|
run: |
|
||||||
python3.9 -m venv .venv
|
[ -n "${{ matrix.tool.apt_dependencies }}" ] && sudo apt-get update && sudo apt-get install -y ${{ matrix.tool.apt_dependencies }}
|
||||||
.venv/bin/python -m pip install --upgrade pip setuptools wheel
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
.venv/bin/python -m pip install padpo
|
python -m pip install ${{ matrix.tool.package }}
|
||||||
- name: Run padpo
|
- name: Run ${{ matrix.tool.package }}
|
||||||
run: PATH=$PATH:$PWD/.venv/bin/ padpo -i *.po */*.po 2>&1 | grep -v -Ff padpo.ignore
|
env:
|
||||||
|
ADDED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.added), ' ') }}
|
||||||
|
MODIFIED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.modified), ' ') }}
|
||||||
|
run: |
|
||||||
|
CHANGED_PO_FILES=$(printf "%s %s\n" "$ADDED_FILES" "$MODIFIED_FILES" | tr ' ' '\n' | grep '.po$')
|
||||||
|
echo "Running on:" $CHANGED_PO_FILES
|
||||||
|
[ -n "$CHANGED_PO_FILES" ] && ${{ matrix.tool.command }} $CHANGED_PO_FILES ${{ matrix.tool.command_suffix }}
|
||||||
|
|
||||||
sphinx:
|
sphinx:
|
||||||
name: 'Génération de la doc (sphinx)'
|
name: 'Génération de la doc (sphinx)'
|
||||||
|
|
|
@ -6,8 +6,8 @@ msgstr ""
|
||||||
"Project-Id-Version: Python 3\n"
|
"Project-Id-Version: Python 3\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-10-01 16:00+0200\n"
|
"POT-Creation-Date: 2020-10-01 16:00+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: 2020-12-11 15:56+0100\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: Julien Palard <julien@palard.fr>\n"
|
||||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
|
|
@ -6,8 +6,8 @@ msgstr ""
|
||||||
"Project-Id-Version: Python 3\n"
|
"Project-Id-Version: Python 3\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
|
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
|
||||||
"PO-Revision-Date: 2018-07-27 22:58+0200\n"
|
"PO-Revision-Date: 2020-12-11 15:56+0100\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: Julien Palard <julien@palard.fr>\n"
|
||||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
|
|
@ -6,8 +6,8 @@ msgstr ""
|
||||||
"Project-Id-Version: Python 3\n"
|
"Project-Id-Version: Python 3\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
|
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
|
||||||
"PO-Revision-Date: 2020-07-20 15:07+0200\n"
|
"PO-Revision-Date: 2020-12-11 15:55+0100\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: Julien Palard <julien@palard.fr>\n"
|
||||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
|
Loading…
Reference in New Issue