diff --git a/.github/workflows/cli_setup.yml b/.github/workflows/cli_setup.yml index 9c7f3ab..ef47463 100644 --- a/.github/workflows/cli_setup.yml +++ b/.github/workflows/cli_setup.yml @@ -64,3 +64,53 @@ jobs: - name: Run ci_tests shell: msys2 {0} run: ./ci_tests -a + + test_docker_container: + needs: test_cli_base_container + + runs-on: ubuntu-latest + + env: + TEST_TAG: qmkfm/qmk_cli:test + + steps: + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.9' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + + - uses: actions/checkout@v7 + + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip install setuptools wheel + pip install --group dev + + - name: Build Python + run: | + python3 -m build + + - name: Build Test Container + uses: docker/build-push-action@v7 + with: + context: . + load: true + tags: ${{ env.TEST_TAG }} + + - name: Test + run: | + docker run --rm -v ${{ github.workspace }}:/qmk_cli -w /qmk_cli ${{ env.TEST_TAG }} /qmk_cli/ci_tests -a + + - name: Build All Containers + uses: docker/build-push-action@v7 + with: + context: . + target: full + platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/docker-pr.yml b/.github/workflows/docker-pr.yml deleted file mode 100644 index 98be1e8..0000000 --- a/.github/workflows/docker-pr.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Test Docker Image - -on: - pull_request: - -jobs: - test: - - runs-on: ubuntu-latest - - steps: - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: '3.9' - - - name: Set up QEMU - uses: docker/setup-qemu-action@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 - - - uses: actions/checkout@v7 - - - name: Run ci_tests - run: ./ci_tests - - - name: Install dependencies - run: | - python3 -m pip install --upgrade pip - pip install setuptools wheel - pip install --group dev - - - name: Build Python - run: | - python3 -m build - - - name: Build Container - uses: docker/build-push-action@v7 - with: - context: . - target: full - platforms: linux/amd64,linux/arm64