File: test.yml

package info (click to toggle)
translate-toolkit 3.18.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,948 kB
  • sloc: python: 70,547; sh: 1,412; makefile: 186; xml: 48
file content (76 lines) | stat: -rw-r--r-- 2,332 bytes parent folder | download
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Tests

on:
  push:
    branches-ignore:
    - renovate/**
  pull_request:

permissions:
  contents: read

jobs:
  test:

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

    steps:
    - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      with:
        persist-credentials: false
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
      id: setup_python
      with:
        allow-prereleases: true
        python-version: ${{ matrix.python-version }}
    - uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
      with:
        cache-suffix: ${{ steps.setup_python.outputs.python-version }}
    - 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: Minimalize deps
      if: matrix.requirements == 'minimal'
      run: sed -i '/^ *"/ s/>=/==/' pyproject.toml
    - name: Install pip dependencies
      run: uv sync --all-extras --dev
    - name: pytest
      run: make test
    - name: test-functional
      if: matrix.os == 'ubuntu-latest'
      env:
        PYTHON_ARGS: -m coverage run --append --source ${{ github.workspace }}/translate
        COVERAGE_FILE: ${{ github.workspace }}/.coverage
      run: |
        source .venv/bin/activate
        make test-functional
    - name: Coverage
      run: uv run coverage xml
    - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
      with:
        name: ${{ runner.os }}, Python ${{ matrix.python-version }}, ${{ matrix.requirements }}