Test Docker #71
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: Test Docker | |
on: | |
workflow_dispatch: | |
jobs: | |
test-manylinux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
base-image: ['manylinux1_x86_64', 'manylinux1_i686', | |
'manylinux2014_aarch64', 'manylinux2014_ppc64le', | |
'manylinux2014_s390x', 'musllinux_1_1_x86_64', | |
'musllinux_1_1_aarch64', 'musllinux_1_1_s390x', | |
'musllinux_1_1_i686', 'musllinux_1_1_ppc64le'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Docker Buildx | |
if: ${{ !startsWith(matrix.base-image, 'manylinux1_') }} | |
uses: crazy-max/[email protected] | |
- name: Build Docker image | |
run: | | |
docker build -t sluggy-image -f Dockerfile_manylinux \ | |
--build-arg BASE=${{ matrix.base-image }} . | |
- run: docker run -v "$PWD:/io" sluggy-image ./test | |
- run: ls packaging/contains-slugs/dist | |
# Verify that precompiled cslug packages can install and run without a C | |
# compiler. | |
- if: matrix.base-image == 'manylinux1_x86_64' | |
run: | | |
docker run -v "$PWD:/io" python:slim bash -c ' | |
pip install /io | |
pip install /io/packaging/contains-slugs/dist/*.whl | |
python -m contains_slugs | |
' | |
test-alpine: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: docker build -t cslug-alpine -f Dockerfile_alpine . | |
- run: docker run -v "$PWD:/io" cslug-alpine ./test | |
# Verify that precompiled cslug packages can install and run without a C | |
# compiler. | |
- run: | | |
docker run -v "$PWD:/io" python:alpine ash -c ' | |
pip install /io | |
pip install /io/packaging/contains-slugs/dist/*.whl | |
python -m contains_slugs | |
' |