mirror of
https://github.com/qmk/qmk_cli.git
synced 2026-08-03 15:57:04 -04:00
Update docker workflow to actually run tests inside built container (#237)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user