Skip to content

ci: Bump lycheverse action version #356

ci: Bump lycheverse action version

ci: Bump lycheverse action version #356

Workflow file for this run

name: Module Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Ubuntu packages
run: |
sudo apt update
sudo apt install -y python3-pip
sudo apt install -y g++-arm-linux-gnueabi binutils-arm-linux-gnueabi
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r ./requirements.txt
python3 -m pip install -r ./tests/test_requirements.txt
- name: Prepare tests
run: |
mkdir test_output
- name: Run tests
run: |
export COVERAGE_RCFILE=$PWD/.coveragerc
cd test_output
python3 -m coverage run --branch --parallel-mode ../tests/test_main.py -c # This uses the coverage module under the hood to gain coverage info of invoked subprocesses
- name: Combine coverage
run: |
export COVERAGE_RCFILE=$PWD/.coveragerc
cd test_output
python3 -m coverage combine * */*
- name: Convert coverage
run: |
export COVERAGE_RCFILE=$PWD/.coveragerc
cd test_output
python3 -m coverage xml
- uses: actions/upload-artifact@v2
with:
name: coverage-report
path: test_output/coverage.xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
verbose: true # optional (default = false)
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Weasyprint Dependencies
run: |
C:\msys64\usr\bin\bash -lc 'pacman -S mingw-w64-x86_64-ttf-dejavu mingw-w64-x86_64-pango mingw-w64-x86_64-ghostscript --noconfirm'
xcopy "C:\msys64\mingw64\share\fonts\TTF" "C:\Users\runneradmin\.fonts" /e /i
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH
rm C:\msys64\mingw64\bin\python.exe
- name: Install binutils
run: |
which objdump
which nm
which size
C:\msys64\usr\bin\bash -lc 'pacman -S mingw-w64-x86_64-arm-none-eabi-binutils --noconfirm'
- name: Install elf_diff Python Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade cffi
python -m pip install -r ./requirements.txt
python -m pip install -r ./tests/test_requirements.txt
- name: Test
shell: bash
run: |
export PATH="${PATH}:/c/tools/msys64/mingw64/bin:/c/msys64/usr/bin" # Ensure that gtk3 dlls are found
mkdir test_output
cd test_output
python ../tests/test_main.py