ci: Configure APT mirror #604
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test on Linux | |
on: | |
push: | |
paths-ignore: | |
- docs/** | |
branches-ignore: | |
- dependabot/** | |
- deepsource** | |
pull_request: | |
paths-ignore: | |
- docs/** | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
requirements: [latest] | |
python-version: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
include: | |
- requirements: minimal | |
python-version: '3.7' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: requirements/*.txt | |
- name: Configure Fast APT Mirror | |
uses: vegardit/fast-apt-mirror.sh@v1 | |
- name: Install apt dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgettextpo-dev libxml2-dev libxmlsec1-dev gettext hunspell-af | |
- name: Update pip | |
run: pip install --upgrade pip wheel | |
- name: Install pip dependencies | |
run: pip install -r requirements/test.txt | |
- name: Install pip dependencies | |
if: matrix.requirements == 'minimal' | |
run: | | |
make requirements/min-versions.txt | |
cat requirements/min-versions.txt | |
pip install -r requirements/min-versions.txt | |
- name: Install | |
run: pip install -e . | |
- name: pytest | |
run: make test | |
- name: test-functional | |
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 | |
with: | |
name: ${{ runner.os }}, Python ${{ matrix.python-version }}, ${{ matrix.requirements }} |