@@ -11,24 +11,27 @@ jobs:
1111 runs-on : ubuntu-latest
1212 container : ghcr.io/qmk/qmk_base_container
1313
14- env :
15- QMK_HOME : ~/qmk_firmware
16-
1714 steps :
1815 - uses : actions/checkout@v6
1916
2017 - name : Install dependencies
2118 run : apt-get update && apt-get install -y python3-venv
2219
20+ - name : Run unit test
21+ run :
22+ python3 -m venv .ci_venv
23+ source .ci_venv/bin/activate
24+ python3 -m pip install -r requirements-dev.txt
25+ pytest
26+
2327 - name : Run ci_tests
24- run : ./ci_tests -a
28+ run : ./ci_tests
2529
2630 test_cli_linux_macos :
2731 needs : test_cli_base_container
2832
2933 runs-on : ${{ matrix.os }}
30- env :
31- QMK_HOME : ~/qmk_firmware
34+
3235 strategy :
3336 matrix :
3437 os : [macos-latest, ubuntu-latest]
@@ -43,14 +46,12 @@ jobs:
4346 python-version : ${{ matrix.python-version }}
4447
4548 - name : Run ci_tests
46- run : ./ci_tests -a
49+ run : ./ci_tests
4750
4851 test_cli_win :
4952 needs : test_cli_base_container
5053
5154 runs-on : windows-latest
52- env :
53- QMK_HOME : $HOME/qmk_firmware
5455
5556 steps :
5657 - uses : actions/checkout@v6
@@ -59,19 +60,63 @@ jobs:
5960 uses : msys2/setup-msys2@v2
6061 with :
6162 update : true
62- install : git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-build mingw-w64-x86_64-python-pillow mingw-w64-x86_64-rust
63+ install : git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-build mingw-w64-x86_64-python-pillow mingw-w64-x86_64-rust mingw-w64-x86_64-python-halo mingw-w64-x86_64-python-nh3 mingw-w64-x86_64-python-rpds-py
6364
6465 # Upgrade pip due to msys packaging + pypa/build/pull/736 issues
6566 - name : (MSYS2) Install Python dependencies
6667 shell : msys2 {0}
6768 run : |
6869 python3 -m pip install --break-system-packages --force-reinstall --upgrade pip
6970
70- - name : (MSYS2) Install QMK CLI from source
71+ - name : Run ci_tests
7172 shell : msys2 {0}
73+ run : ./ci_tests
74+
75+ test_docker_container :
76+ needs : test_cli_base_container
77+
78+ runs-on : ubuntu-latest
79+
80+ env :
81+ TEST_TAG : qmkfm/qmk_cli:test
82+
83+ steps :
84+ - name : Set up Python
85+ uses : actions/setup-python@v6
86+ with :
87+ python-version : ' 3.9'
88+
89+ - name : Set up QEMU
90+ uses : docker/setup-qemu-action@v4
91+
92+ - name : Set up Docker Buildx
93+ uses : docker/setup-buildx-action@v4
94+
95+ - uses : actions/checkout@v6
96+
97+ - name : Install dependencies
98+ run : |
99+ python3 -m pip install --upgrade pip
100+ pip install setuptools wheel
101+ pip install -r requirements-dev.txt
102+
103+ - name : Build Python
72104 run : |
73105 python3 -m build
74- python3 -m pip install --break-system-packages dist/qmk-*.tar.gz
75- - name : (MSYS2) Run qmk setup -y
76- shell : msys2 {0}
77- run : qmk setup -y
106+
107+ - name : Build Test Container
108+ uses : docker/build-push-action@v7
109+ with :
110+ context : .
111+ load : true
112+ tags : ${{ env.TEST_TAG }}
113+
114+ - name : Test
115+ run : |
116+ docker run --rm ${{ env.TEST_TAG }} qmk setup -y
117+
118+ - name : Build All Containers
119+ uses : docker/build-push-action@v7
120+ with :
121+ context : .
122+ platforms : linux/amd64,linux/arm64
0 commit comments