File: tests.yml

package info (click to toggle)
manimpango 0.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,804 kB
  • sloc: python: 1,252; sh: 164; makefile: 18
file content (119 lines) | stat: -rw-r--r-- 4,010 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Test

on:
  push:
    branches: [main, tests-build, v*]
  pull_request:
    branches: [main, v*]

concurrency:
  group: ${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    name: ${{ matrix.os }} - ${{ matrix.python-version }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
    steps:
      - uses: actions/checkout@v3
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
          allow-prereleases: true
      - name: Install Dependency and Configure
        if: runner.os == 'macOS'
        run: |
          brew install cairo
          echo "LD_LIBRARY_PATH=$HOME/pangoprefix/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
          echo "PKG_CONFIG_PATH=$HOME/pangoprefix/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
      - name: Set ENV
        if: runner.os == 'Linux'
        run: |
          echo "LD_LIBRARY_PATH=$HOME/pangoprefix/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> $GITHUB_ENV
          echo "PKG_CONFIG_PATH=$HOME/pangoprefix/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
      - name: Cache Pango
        id: cache-pango
        uses: actions/cache@v3
        with:
          path: ~/pangoprefix
          key: ${{ hashFiles('packing/build_pango_tests.sh') }}-${{ runner.os }}
      - name: Install System Dependency
        if: steps.cache-pango.outputs.cache-hit != 'true'
        run: |
          source packing/build_pango_tests.sh
      - name: Install python dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements-dev.txt
      - name: Build Project
        run: python setup.py build_ext -i
      - name: Run Tests
        run: pytest -s
      - uses: codecov/codecov-action@v3
        with:
          file: ./.coverage/coverage.xml
      - uses: actions/upload-artifact@v4
        with:
          name: test-artifacts-${{matrix.os}}-${{matrix.python-version}}
          path: .pytest_temp/

  msvc:
    name: ${{matrix.os}} - ${{matrix.python-version}} - ${{matrix.architecture}}
    runs-on: ${{matrix.os}}
    strategy:
      fail-fast: false
      matrix:
        os: [windows-2022]
        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
        architecture: ["x64", "x86"]
    steps:
      - uses: actions/checkout@v3
      - name: Set up Python ${{ matrix.python-version }} for ${{matrix.architecture}}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
          architecture: ${{matrix.architecture}}
          allow-prereleases: true
      - name: Download Binary
        run: |
          python packing/download_dlls.py
      - name: Set Path for pkg-config
        run: |
          $env:Path = "C:\cibw\pkg-config\bin;C:\cibw\vendor\bin;$($env:PATH)"
          echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
      - name: Install Python Dependencies
        run: |
          python -m pip install -U pip
          pip install -U setuptools wheel
          pip install -r requirements-dev.txt
      - name: Build Project
        env:
          PKG_CONFIG_PATH: C:\cibw\vendor\lib\pkgconfig
        run: python setup.py build_ext -i
      - name: Run tests
        run: |
          pytest -s
      - uses: actions/upload-artifact@v4
        with:
          name: test-artifacts-${{matrix.os}}-${{matrix.python-version}} ${{matrix.architecture}}
          path: .pytest_temp/
  success-win:
    needs: [msvc]
    runs-on: ubuntu-latest
    name: Windows Test Successful
    steps:
      - name: Success
        run: echo Windows Test Successful
  success-all:
    needs: [test]
    runs-on: ubuntu-latest
    name: Mac and Linux Test Successful
    steps:
      - name: Success
        run: echo Mac and Linux Test Successful