Repository navigation
ci #929
This file contains hidden or 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
| # SPDX-FileCopyrightText: 2025 Aleksandr Mezin <mezin.alexander@gmail.com> | |
| # | |
| # SPDX-License-Identifier: MIT | |
| name: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| schedule: | |
| - cron: 5 4 * * * | |
| concurrency: | |
| group: ${{ github.workflow }}/${{ github.ref }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-26.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| - run: npm ci | |
| - run: npm run lint | |
| - uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0 | |
| plan: | |
| runs-on: ubuntu-26.04 | |
| timeout-minutes: 5 | |
| outputs: | |
| services: ${{ steps.compose.outputs.services }} | |
| packagekit-services: ${{ steps.compose.outputs.packagekit-services }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - 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-26.04 | |
| timeout-minutes: 15 | |
| needs: | |
| - lint | |
| - plan | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| image: ${{ fromJSON(needs.plan.outputs.services) }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - run: systemctl --user enable --now podman.socket | |
| - id: packagekit-up | |
| if: contains(fromJSON(needs.plan.outputs.packagekit-services), env.SERVICE) | |
| run: podman compose up --build --wait "$SERVICE" | |
| env: | |
| SERVICE: ${{ matrix.image }}-packagekit | |
| - run: podman exec --latest -u testuser tests/e2e-tests.sh | |
| if: ${{ !cancelled() && steps.packagekit-up.outcome == 'success' }} | |
| - run: podman compose --profile packagekit down | |
| if: ${{ !cancelled() && steps.packagekit-up.outcome != 'skipped' }} | |
| - id: base-up | |
| if: ${{ !cancelled() }} | |
| run: podman compose up --build --wait "$SERVICE" | |
| env: | |
| SERVICE: ${{ matrix.image }} | |
| - run: podman exec --latest -u testuser tests/e2e-tests.sh | |
| if: ${{ !cancelled() && steps.base-up.outcome == 'success' }} | |
| - run: podman compose --profile base down | |
| if: ${{ !cancelled() && steps.base-up.outcome != 'skipped' }} | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: ${{ always() }} | |
| with: | |
| name: ${{ matrix.image }} | |
| path: tests/build-*/meson-logs | |
| doc: | |
| needs: lint | |
| runs-on: ubuntu-26.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| - run: npm ci | |
| - run: npm run doc | |
| - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | |
| with: | |
| path: html | |
| name: docs-${{ github.run_attempt }} | |
| doc-publish: | |
| if: github.ref_name == github.event.repository.default_branch | |
| needs: doc | |
| runs-on: ubuntu-slim | |
| timeout-minutes: 5 | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 | |
| with: | |
| artifact_name: docs-${{ github.run_attempt }} |