11name : Build pipeline
22on :
33 push :
4- branches :
5- - master
6- - devel
4+ pull_request :
75 release :
86 types : [released]
7+ workflow_dispatch :
98
109jobs :
1110 build :
1413 steps :
1514 - uses : actions/checkout@v4
1615 - name : 🏗 Set up Python 3.10
17- uses : actions/setup-python@v4
16+ uses : actions/setup-python@v5
1817 with :
1918 python-version : " 3.10"
2019 - name : 🏗 Install build dependencies
3534 steps :
3635 - uses : actions/checkout@v4
3736 - name : 🏗 Set up Python 3.10
38- uses : actions/setup-python@v4
37+ uses : actions/setup-python@v5
3938 with :
4039 python-version : " 3.10"
4140 - name : 🏗 Set up pre-commit
@@ -45,18 +44,57 @@ jobs:
4544 run : |
4645 pre-commit run --all-files --show-diff-on-failure
4746
47+ test-install :
48+ name : 🧪 Installation test
49+ strategy :
50+ matrix :
51+ python : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
52+ runs-on : ubuntu-22.04 # change back to ubuntu-latest once we drop Python 3.7
53+ steps :
54+ - uses : actions/checkout@v4
55+ - name : 🏗 Set up Python ${{ matrix.python }}
56+ uses : actions/setup-python@v4
57+ with :
58+ python-version : ${{ matrix.python }}
59+ - name : 🚀 Set up test dependencies & run test install
60+ run : |
61+ pip install octoprint
62+ pip install -e .[develop]
63+
64+ e2e :
65+ name : 🧪 E2E tests
66+ needs : build
67+ runs-on : ubuntu-22.04 # change back to ubuntu-latest once we drop Python 3.7 & upgrade playwright
68+ strategy :
69+ matrix :
70+ octoprint : ["master", "maintenance"]
71+ steps :
72+ - name : ⬇ Download build result
73+ uses : actions/download-artifact@v4
74+ with :
75+ name : dist
76+ path : dist
77+
78+ - name : 🎭 Run OctoPrint's E2E Tests
79+ uses : OctoPrint/actions/e2e@main
80+ with :
81+ ref : ${{ matrix.octoprint }}
82+ deps : ${{ github.workspace }}/dist/*.whl
83+ suffix : " -${{ matrix.octoprint }}"
84+
4885 publish-on-testpypi :
4986 name : 📦 Publish on TestPyPI
5087 if : github.event_name == 'release'
5188 needs :
5289 - build
5390 - pre-commit
91+ - e2e
5492 runs-on : ubuntu-latest
93+ permissions :
94+ id-token : write
5595 environment :
5696 name : testpypi
5797 url : https://test.pypi.org/p/OctoPrint-FirmwareCheck
58- permissions :
59- id-token : write
6098 steps :
6199 - name : ⬇ Download build result
62100 uses : actions/download-artifact@v4
@@ -73,11 +111,11 @@ jobs:
73111 if : github.event_name == 'release'
74112 needs : publish-on-testpypi
75113 runs-on : ubuntu-latest
114+ permissions :
115+ id-token : write
76116 environment :
77117 name : pypi
78118 url : https://pypi.org/p/OctoPrint-FirmwareCheck
79- permissions :
80- id-token : write
81119 steps :
82120 - name : ⬇ Download build result
83121 uses : actions/download-artifact@v4
0 commit comments