Skip to content

CI: remove msys2 tests #675

CI: remove msys2 tests

CI: remove msys2 tests #675

Workflow file for this run

name: Test
on:
push:
branches: [main,tests-build,v*]
pull_request:
branches: [main]
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.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- 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: Run Tests
run: |
python setup.py build_ext -i --coverage
python setup.py sdist
pip install .
pytest
- name: Coverage
run: |
coverage report
coverage html
coverage xml
- uses: codecov/codecov-action@v3
with:
file: ./.coverage/coverage.xml
- uses: actions/upload-artifact@v3
with:
name: test-artifacts-${{matrix.os}}-${{matrix.python-version}}
path: .pytest_temp/
msvc:
name: ${{matrix.os}} - ${{matrix.python-version}}
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [windows-2022]
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} for x64
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"
- name: Cache Windows
id: cache-windows
uses: actions/cache@v3
with:
path: C:\cibw\pkg-config
key: ${{ hashFiles('packing/download_dlls.py') }}-${{ hashFiles('packing/build_pkgconfig.ps1') }}-1
- name: Download Binary
run: |
python packing/download_dlls.py
- name: Set Path
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: Test x64
run: |
pip install -U setuptools wheel
$env:PKG_CONFIG_PATH="C:\cibw\vendor\lib\pkgconfig"
pip install -r requirements-dev.txt
python setup.py build_ext -i --coverage
pytest
- name: Coverage
run: |
coverage report
coverage html
coverage xml
- name: Set up Python ${{ matrix.python-version }} for x86
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: "x86"
- name: Download Binary
run: |
python packing/download_dlls.py
- name: Build x86 Build
run: |
$env:PATH="$env:PATH;C:\cibw\vendor\pkg-config\bin;C:\cibw\vendor\bin"
$env:PKG_CONFIG_PATH="C:\cibw\vendor\lib\pkgconfig"
pip install -r requirements-dev.txt
python setup.py build_ext -i --coverage
python setup.py sdist
python -m pip install dist/*
$env:PATH="C:\cibw\vendor\bin;$env:PATH"
pytest
- name: Coverage
run: |
coverage report
coverage html
coverage xml
- uses: codecov/codecov-action@v3
with:
file: ./.coverage/coverage.xml
- uses: actions/upload-artifact@v3
with:
name: test-artifacts-${{matrix.os}}-${{matrix.python-version}}
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