Skip to content

Test UMB

Test UMB #313

Workflow file for this run

name: Test UMB
on:
schedule:
- cron: '26 8 * * *'
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
# to trigger the workflow manually
workflow_dispatch:
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
name: Build on ${{ matrix.platform }}
runs-on: ${{ matrix.runs-on }}
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
strategy:
matrix:
include:
# Set defaults
- runs-on: ubuntu-latest
platform: linux/amd64
- runs-on: ubuntu-24.04-arm
platform: linux/arm64
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build from Dockerfile
run: docker build -t pmctools/umbi:ci .
- name: Run Docker
run: docker run -d -it --name ci pmctools/umbi:ci
- name: Run tests
run: docker exec ci bash -c "cd /opt/umb; python -m pytest --junit-xml=test-results.xml tests"
- name: Download test results
if: always()
run: docker cp ci:/opt/umb/test-results.xml test-results.xml
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
# A list of JUnit XML files, directories containing the former, and wildcard
# patterns to process.
# See @actions/glob for supported patterns.
path: test-results.xml
# (Optional) Add a summary of the results at the top of the report
summary: true
# (Optional) Select which results should be included in the report.
# Follows the same syntax as `pytest -r`
display-options: fEX
# (Optional) Fail the workflow if no JUnit XML was found.
fail-on-empty: true
# (Optional) Title of the test results section in the workflow summary
title: Test results