Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
p0358 committed Apr 13, 2024
2 parents 6f86bb7 + fea0312 commit a31f27a
Show file tree
Hide file tree
Showing 420 changed files with 6,569 additions and 8,869 deletions.
17 changes: 0 additions & 17 deletions .github/matchers/flake8.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
Expand All @@ -31,7 +31,7 @@ jobs:
sudo apt-get install -y libgettextpo-dev
- name: Install dependencies
run: |
pip install --upgrade pip wheel
python -m pip install --upgrade pip wheel
pip install -r requirements/dev.txt
- name: Build docs
run: make docs
58 changes: 0 additions & 58 deletions .github/workflows/osx.yml

This file was deleted.

44 changes: 1 addition & 43 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
Expand All @@ -28,45 +28,3 @@ jobs:
pip install -r requirements/lint.txt
- name: pre-commit
run: pre-commit run --all

pydocstyle:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
cache-dependency-path: requirements/*.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements/lint.txt
- name: Run pydocstyle
run: |
echo "::add-matcher::.github/matchers/flake8.json"
pre-commit run --all pydocstyle
echo "::remove-matcher owner=flake8::"
flake8:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
cache-dependency-path: requirements/*.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements/lint.txt
- name: Run flake8
run: |
echo "::add-matcher::.github/matchers/flake8.json"
pre-commit run --all flake8
echo "::remove-matcher owner=flake8::"
49 changes: 46 additions & 3 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches-ignore:
- dependabot/**
- deepsource**
tags:
- '*'
pull_request:

permissions:
Expand All @@ -20,7 +22,7 @@ jobs:
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
Expand All @@ -30,7 +32,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgettextpo-dev
- name: Update pip
run: pip install --upgrade pip wheel
run: python -m pip install --upgrade pip wheel
- name: Install pip dependencies
run: |
pip install -r requirements/dev.txt
Expand Down Expand Up @@ -58,6 +60,47 @@ jobs:
run: coverage run --append ./setup.py sdist
- name: Coverage
run: coverage xml
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
name: setup
- uses: actions/upload-artifact@v4
with:
path: ./dist/*

pypi-publish:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
needs:
- setup
runs-on: ubuntu-22.04
permissions:
# this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-publish:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
needs:
- setup
runs-on: ubuntu-22.04
permissions:
# this permission is mandatory for creating a release
contents: write
steps:
- uses: actions/download-artifact@v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- uses: ncipollo/release-action@v1
with:
artifacts: dist/*
24 changes: 19 additions & 5 deletions .github/workflows/linux.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test on Linux
name: Tests

on:
push:
Expand All @@ -17,33 +17,46 @@ permissions:
jobs:
test:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
requirements: [latest]
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
os:
- ubuntu-latest
- windows-latest
- macos-latest
include:
- requirements: minimal
python-version: '3.8'
os: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: requirements/*.txt
- name: Install apt dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgettextpo-dev libxml2-dev libxmlsec1-dev gettext hunspell-af
- name: Install Windows dependencies
if: matrix.os == 'windows-latest'
run: |
nuget install Gettext.Tools -Version 0.22.4 -OutputDirectory c:\nuget;
Add-Content $env:GITHUB_PATH "C:\nuget\Gettext.Tools.0.22.4\tools\bin"
- name: Update pip
run: pip install --upgrade pip wheel
run: python -m pip install --upgrade pip wheel
- name: Install pip dependencies
run: pip install -r requirements/test.txt
- name: Install pip dependencies
Expand All @@ -57,13 +70,14 @@ jobs:
- name: pytest
run: make test
- name: test-functional
if: matrix.os != 'windows-latest'
env:
PYTHON_ARGS: -m coverage run --append --source ${{ github.workspace }}/translate
COVERAGE_FILE: ${{ github.workspace }}/.coverage
run: make test-functional
- name: Coverage
run: |
coverage xml
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
name: ${{ runner.os }}, Python ${{ matrix.python-version }}, ${{ matrix.requirements }}
51 changes: 0 additions & 51 deletions .github/workflows/win.yml

This file was deleted.

Loading

0 comments on commit a31f27a

Please sign in to comment.