Skip to content

Test on Alpine Linux #18

Test on Alpine Linux

Test on Alpine Linux #18

Workflow file for this run

# SPDX-FileCopyrightText: 2025 Aleksandr Mezin <mezin.alexander@gmail.com>
#
# SPDX-License-Identifier: MIT
name: ci
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}/${{ github.ref }}
jobs:
lint:
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version-file: .nvmrc
- run: npm ci
- run: npm run lint
- uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0
plan:
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
services: ${{ steps.compose.outputs.services }}
packagekit-services: ${{ steps.compose.outputs.packagekit-services }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- run: systemctl --user enable --now podman.socket
- id: compose
run: |
services="$(podman compose --profile base config --services | sort | jq -cnR '[inputs]')"
echo "services=$services" | tee -a "$GITHUB_OUTPUT"
packagekit_services="$(podman compose --profile packagekit config --services | sort | jq -cnR '[inputs]')"
echo "packagekit-services=$packagekit_services" | tee -a "$GITHUB_OUTPUT"
test:
runs-on: ubuntu-24.04
timeout-minutes: 10
needs:
- lint
- plan
strategy:
fail-fast: false
matrix:
image: ${{ fromJSON(needs.plan.outputs.services) }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- run: systemctl --user enable --now podman.socket
- id: packagekit
run: podman compose build "$SERVICE"
if: contains(needs.plan.outputs.packagekit-services, env.SERVICE)
env:
SERVICE: ${{ matrix.image }}-packagekit
- run: podman compose build "$SERVICE"
env:
SERVICE: ${{ matrix.image }}
- run: podman compose up -d "$SERVICE"
if: steps.packagekit.outcome == 'success'
env:
SERVICE: ${{ matrix.image }}-packagekit
- run: podman wait --latest --condition=healthy
if: steps.packagekit.outcome == 'success'
- run: podman exec --latest -u testuser ./sequence.sh
if: steps.packagekit.outcome == 'success'
- run: podman compose --profile packagekit down
if: steps.packagekit.outcome == 'success'
- run: podman compose up -d "$SERVICE"
if: steps.packagekit.outcome == 'success'
env:
SERVICE: ${{ matrix.image }}-packagekit
- run: podman wait --latest --condition=healthy
if: steps.packagekit.outcome == 'success'
- run: podman exec --latest -u testuser ./sequence2.sh
if: steps.packagekit.outcome == 'success'
- run: podman compose --profile packagekit down
if: steps.packagekit.outcome == 'success'
- run: podman compose up -d "$SERVICE"
env:
SERVICE: ${{ matrix.image }}
- run: podman wait --latest --condition=healthy
- run: podman exec --latest -u testuser ./sequence.sh
- run: podman compose --profile base down
- run: podman compose up -d "$SERVICE"
env:
SERVICE: ${{ matrix.image }}
- run: podman wait --latest --condition=healthy
- run: podman exec --latest -u testuser ./sequence2.sh
- run: podman compose --profile base down