fix reference to qevent type #218
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: run tests | |
on: | |
push: | |
branches: | |
- '*' | |
paths: | |
- 'src/main/python/**' | |
- 'src/test/**' | |
- 'poetry.lock' | |
- 'test.yaml' | |
pull_request: | |
branches: | |
- '*' | |
paths: | |
- 'src/main/python/**' | |
- 'src/test/**' | |
- 'poetry.lock' | |
- 'test.yaml' | |
workflow_dispatch: | |
branches: | |
- '*' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04, macos-12, macos-13, macos-14, windows-2022 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ runner.arch }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction | |
- name: Install project | |
run: poetry install --no-interaction | |
- name: Install test dependencies | |
run: | | |
if [[ "$RUNNER_OS" == "Linux" ]] | |
then | |
sudo apt install -y libegl1 | |
fi | |
- name: pytest | |
run: | | |
PYTHONPATH=./src/main/python poetry run pytest --cov=./src/main/python | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ./coverage.xml | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Install packaging dependencies | |
run: | | |
if [[ "$RUNNER_OS" == "Linux" ]] | |
then | |
sudo apt install -y libblas-dev liblapack-dev libsndfile1 graphviz | |
sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 libxcb-util1 libxcb-xkb1 libxcb-shape0 | |
elif [[ "$RUNNER_OS" == "Windows" ]] | |
then | |
choco install openssl.light graphviz | |
elif [[ "$RUNNER_OS" == "macOS" ]] | |
then | |
brew install graphviz | |
brew ls -v graphviz | |
fi | |
poetry run pip install pyinstaller | |
- name: Get version | |
id: get_version | |
run: echo "name=sha_short::$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Append version | |
run: | | |
echo ${{ steps.get_version.outputs.sha_short }} > src/main/python/VERSION | |
- name: Create distribution | |
run: | | |
export QT_DEBUG_PLUGINS=1 | |
export DISPLAY=:0 | |
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 & | |
poetry run pyinstaller --clean --log-level=INFO beqdesigner.spec | |
if [[ "$RUNNER_OS" == "macOS" ]] | |
then | |
pushd dist | |
rm beqdesigner | |
zip -r beqdesigner.app.${{ matrix.os }}.zip beqdesigner.app | |
rm -Rf beqdesigner.app | |
popd | |
fi | |
- name: Archive app binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: beqdesigner-apps-${{matrix.os}} | |
path: | | |
dist/beqdesigner.exe | |
dist/beqdesigner*.zip | |
dist/beqdesigner_* | |
retention-days: 1 |