Skip to content

Automatically check Docker daemon before registry pulls #44

Automatically check Docker daemon before registry pulls

Automatically check Docker daemon before registry pulls #44

Workflow file for this run

name: dynamic
on: pull_request
permissions:
contents: read
packages: read
jobs:
check-test:
strategy:
matrix:
settings:
- host: windows-latest
target: x86_64-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
- host: macos-latest
target: aarch64-apple-darwin
- host: macos-latest
target: x86_64-apple-darwin
runs-on: ${{ matrix.settings.host }}
name: test / ${{ matrix.settings.host }} / ${{ matrix.settings.target }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
- uses: taiki-e/install-action@nextest
- uses: Swatinem/[email protected]
with:
key: test_${{ matrix.settings.host }}_${{ matrix.settings.target }}
- uses: docker/login-action@v3
if: ${{ matrix.settings.host == 'ubuntu-latest' }}
with:
registry: quay.io
username: fossa+sparkle
password: ${{ secrets.QUAY_API_KEY }}
- uses: docker/login-action@v3
if: ${{ matrix.settings.host == 'ubuntu-latest' }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
# Pull a small test image to ensure we have at least one image in the Docker daemon for tests
- name: Pull alpine test image (Linux/Mac)
if: ${{ matrix.settings.host == 'ubuntu-latest' || matrix.settings.host == 'macos-latest' }}
run: docker pull alpine:latest
- name: Pull alpine test image (Windows)
if: ${{ matrix.settings.host == 'windows-latest' }}
run: docker pull alpine:latest
- run: cargo nextest run --all-targets
- run: cargo test --doc
check-build:
strategy:
matrix:
settings:
- host: windows-latest
target: x86_64-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
- host: macos-latest
target: aarch64-apple-darwin
- host: macos-latest
target: x86_64-apple-darwin
runs-on: ${{ matrix.settings.host }}
name: build / ${{ matrix.settings.host }} / ${{ matrix.settings.target }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
- uses: Swatinem/[email protected]
with:
key: build_${{ matrix.settings.host }}_${{ matrix.settings.target }}
- run: cargo check --all --bins --examples --tests
- run: cargo build