From e9f2aff776e29de31f6b7f29b9c9e05e7363ef6d Mon Sep 17 00:00:00 2001 From: Jan Grewe Date: Sun, 7 Mar 2021 12:14:42 +0100 Subject: [PATCH 1/4] Create python-app.yml --- .github/workflows/python-app.yml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..a95e696 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,34 @@ +# This workflow will install Python dependencies, run tests and lint 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: Python application + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: macos-10.15 + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pyqt5 pyinstaller + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics From 8f8b6e497aa019060ffa2a5024188c712c155727 Mon Sep 17 00:00:00 2001 From: Jan Grewe Date: Sun, 7 Mar 2021 12:16:31 +0100 Subject: [PATCH 2/4] Update python-app.yml --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index a95e696..2aa4715 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pyqt5 pyinstaller + pip install pyqt5 pyinstaller flake8 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 From a171089b893677a17a307311385370cb30be6857 Mon Sep 17 00:00:00 2001 From: Jan Grewe Date: Sun, 7 Mar 2021 12:38:59 +0100 Subject: [PATCH 3/4] Update python-app.yml --- .github/workflows/python-app.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 2aa4715..12c8c13 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -32,3 +32,20 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + + - name: create package + run: | + pyrcc5 resources.qrc resources.py + pyinstaller --onefile --windowed -i icons/blipblop_logo.icns --add_data="icons/blipblop_logo.png:." blipblop.py + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2.2.2 + with: + # Artifact name + name: blipblop-binary + # A file, directory or wildcard pattern that describes what to upload + path: | + dist + retention-days: 1 + + From 41d4b28d3fb3ba4f2ab6bf58e7e838a1dff09174 Mon Sep 17 00:00:00 2001 From: Jan Grewe Date: Sun, 7 Mar 2021 12:44:55 +0100 Subject: [PATCH 4/4] Update python-app.yml --- .github/workflows/python-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 12c8c13..ab4e6b4 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -35,8 +35,8 @@ jobs: - name: create package run: | - pyrcc5 resources.qrc resources.py - pyinstaller --onefile --windowed -i icons/blipblop_logo.icns --add_data="icons/blipblop_logo.png:." blipblop.py + pyrcc5 resources.qrc + pyinstaller --onefile --windowed -i icons/blipblop_logo.icns --add_data="icons/blipblop_logo.png:." --add_data="resources.py:." blipblop.py - name: Upload a Build Artifact uses: actions/upload-artifact@v2.2.2