-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run build and pre-commit github actions
- Loading branch information
Showing
4 changed files
with
98 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Build | ||
on: | ||
push: | ||
pull_request: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: 🔨 Build distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: 🏗 Set up Python 3.7 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: 🏗 Install build dependencies | ||
run: | | ||
pip install wheel --user | ||
pip install octoprint[develop] | ||
- name: 🔨 Build a binary wheel and a source tarball | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: ⬆ Upload build result | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
pre-commit: | ||
name: 🧹 Pre-commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 🏗 Set up Python 3.7 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: 🏗 Set up dev dependencies | ||
run: | | ||
pip install octoprint[develop] | ||
pip install -e .[develop] | ||
- name: 🚀 Run pre-commit | ||
run: | | ||
pre-commit run --all-files --show-diff-on-failure | ||
test-install: | ||
name: 🧪 Installation tests | ||
needs: build | ||
strategy: | ||
matrix: | ||
python: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"] | ||
installable: ["wheel", "sdist"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇ Download build result | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: 🏗 Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: 🏗 Install OctoPrint | ||
run: | | ||
pip install OctoPrint | ||
- name: 🚀 Install wheel | ||
if: matrix.installable == 'wheel' | ||
run: | | ||
pip install dist/OctoPrint_*-py2.py3-none-any.whl | ||
- name: 🚀 Install source tarball | ||
if: matrix.installable == 'sdist' | ||
run: | | ||
pip install dist/OctoPrint-*.tar.gz |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[metadata] | ||
license_file = LICENSE.txt | ||
license_file = LICENSE | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
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