Find slots for each shape rotation before filling. #149
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
# This workflow will install Python dependencies and run tests with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: build | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y -q freeglut3-dev xvfb libxkbcommon-x11-0 xserver-xephyr libxcb-xinerama0 | |
python -m pip install --upgrade pip | |
pip install pipenv | |
pipenv install --dev | |
pip install coverage # Extra copy for codecov upload. | |
- name: Scan with mypy | |
run: | | |
pipenv run mypy four_letter_blocks | |
- name: Test with pytest | |
id: test | |
run: | | |
# Add QT_DEBUG_PLUGINS=1 before xvfb-run to debug Qt library problems. | |
xvfb-run -a pipenv run python -m coverage run --source=four_letter_blocks -m pytest | |
- name: Upload code coverage | |
run: | | |
pipenv install codecov | |
pipenv run codecov | |
- name: Upload image diffs | |
uses: actions/upload-artifact@v2 | |
if: ${{ always() && steps.test.outcome == 'failure' }} | |
with: | |
name: image-diffs | |
path: | | |
tests/pixmap_diffs/*.png | |
tests/pixmap_diffs/*.svg |