diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..a6def297 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,83 @@ +--- + +name: Tests + +on: + push: + branches: + - '*.*' + pull_request: + branches: + - '*.*' + +jobs: + pospell: + name: 'Orthographe' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install pospell + run: | + sudo apt-get update + sudo apt-get install -y hunspell hunspell-fr-comprehensive + sudo python3 -m pip install pospell + - name: Run pospell + run: pospell -p dict -l fr_FR *.po */*.po + + powrap: + name: 'Ensure wrapping consistency' + 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' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Install padpo + run: | + python3.9 -m venv .venv + .venv/bin/python -m pip install --upgrade pip setuptools wheel + .venv/bin/python -m pip install padpo + - name: Run padpo + run: PATH=$PATH:$PWD/.venv/bin/ padpo -i *.po */*.po 2>&1 | grep -v -Ff padpo.ignore + + sphinx: + name: 'Build the doc' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: '~/cpython/' + key: '1' + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Clone cpython + run: | + if [ ! -d ~/cpython ]; then + git clone https://github.com/python/cpython ~/cpython/ + else + git -C ~/cpython fetch + fi + - name: Prepare build hierarchy + run: | + mkdir -p ~/locales/fr/LC_MESSAGES/ + cp -uv --parents *.po */*.po ~/locales/fr/LC_MESSAGES/ + git -C ~/cpython checkout b30934e9afb0af3f8e2e5f0992445be775b3c630 + - name: Prepare venv + run: make -C $HOME/cpython/Doc venv + - name: sphinx-build + run: make -C $HOME/cpython/Doc SPHINXOPTS="-qW -j4 -D locale_dirs=$HOME/locales -D language=fr -D gettext_compact=0" autobuild-dev-html diff --git a/Makefile b/Makefile index c797d0a5..2ea5f117 100644 --- a/Makefile +++ b/Makefile @@ -30,8 +30,6 @@ BRANCH := 3.9 EXCLUDED := whatsnew/ c-api/ -.SILENT: - # Internal variables UPSTREAM := https://github.com/python/cpython