[chore] Test Docker architectures on PR #49
Workflow file for this run
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
name: Pull Request checks | |
on: | |
pull_request: ~ | |
workflow_dispatch: ~ | |
jobs: | |
check_env_vars: | |
name: Check all defined environment variables are documented | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Run ci/env_vars_check.py | |
run: | | |
python3 ci/env_vars_check.py | |
test_docker_archs: | |
name: Test Docker images on all architectures | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: | |
- docker: amd64 # used by docker create --platform | |
- docker: arm64 | |
- docker: arm/v7 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
with: | |
platforms: ${{ matrix.arch }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
id: docker-buildx | |
- name: Build Docker image | |
run: | | |
docker buildx build \ | |
--platform linux/${{ matrix.arch }} \ | |
--tag test/${{ matrix.arch }}:latest \ | |
--file Dockerfile \ | |
. | |
- name: Run Docker image | |
run: | | |
docker run \ | |
--rm \ | |
-w ${{ github.workspace }} \ | |
--platform linux/${{ matrix.arch }} \ | |
test/${{ matrix.arch }}:latest \ | |
uname -a | |
# Bot inside will fail because environment variables are not set |