* fix & test on vanilla linux distros * add alpine and opensuse * merge * and void of course * cleanup the logs * need bash
74 lines
2.5 KiB
YAML
74 lines
2.5 KiB
YAML
name: ./test.sh
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
name: ${{ matrix.image || matrix.os }}
|
|
runs-on: ${{ matrix.runs-on }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# native (no docker)
|
|
- os: macos-latest
|
|
runs-on: macos-latest
|
|
|
|
# the provided github actions runner images
|
|
# have tons of pre-installed packages. the
|
|
# goal here is to test across many vanilla setups
|
|
- image: debian:bookworm-slim
|
|
runs-on: ubuntu-latest
|
|
- image: ubuntu:24.04
|
|
runs-on: ubuntu-latest
|
|
- image: fedora:41
|
|
runs-on: ubuntu-latest
|
|
- image: archlinux:latest
|
|
runs-on: ubuntu-latest
|
|
- image: alpine:3.21 # musl libc
|
|
runs-on: ubuntu-latest
|
|
- image: opensuse/tumbleweed:latest
|
|
runs-on: ubuntu-latest
|
|
- image: ghcr.io/void-linux/void-glibc:latest
|
|
runs-on: ubuntu-latest
|
|
- image: debian:bookworm-slim
|
|
runs-on: ubuntu-24.04-arm
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
# native (macOS)
|
|
- if: ${{ !matrix.image }}
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.14"
|
|
- if: ${{ !matrix.image }}
|
|
name: ./test.sh
|
|
run: ./test.sh
|
|
|
|
# docker (vanilla Linux)
|
|
- if: ${{ matrix.image }}
|
|
name: install python3
|
|
run: |
|
|
docker build -t test -f - . <<'DOCKERFILE'
|
|
FROM ${{ matrix.image }}
|
|
RUN if command -v apk >/dev/null; then \
|
|
apk add --no-cache python3 py3-pip bash curl; \
|
|
elif command -v apt-get >/dev/null; then \
|
|
apt-get update && apt-get install -y --no-install-recommends python3 python3-pip python3-venv curl ca-certificates; \
|
|
elif command -v dnf >/dev/null; then \
|
|
dnf install -y python3 python3-pip curl; \
|
|
elif command -v pacman >/dev/null; then \
|
|
pacman -Sy --noconfirm python python-pip curl; \
|
|
elif command -v zypper >/dev/null; then \
|
|
zypper install -y python3 python3-pip curl; \
|
|
elif command -v xbps-install >/dev/null; then \
|
|
xbps-install -Sy python3 python3-pip bash curl; \
|
|
fi
|
|
DOCKERFILE
|
|
- if: ${{ matrix.image }}
|
|
name: ./test.sh
|
|
run: docker run --rm -v "$PWD:/work" -w /work test bash ./test.sh
|