Skip to content

refactor(orchestrator): describe every failing NBD command the same way #2558

refactor(orchestrator): describe every failing NBD command the same way

refactor(orchestrator): describe every failing NBD command the same way #2558

Workflow file for this run

name: Push Main
permissions:
contents: read
id-token: write
on:
push:
branches:
- main
jobs:
detect-changes:
name: Detect changed paths
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
changed-scopes: ${{ steps.changed-paths.outputs.changes }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 20
persist-credentials: false
- id: changed-paths
name: Detect CI-relevant changes
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
with:
base: ${{ github.ref }}
filters: |
test-inputs:
- 'packages/**'
- 'tests/**'
- 'spec/**'
- 'go.work'
- 'go.work.sum'
- 'Makefile'
- '.github/**'
- '.tool-versions'
unit-tests:
needs: [detect-changes]
uses: ./.github/workflows/pr-tests.yml
with:
run-tests: ${{ contains(fromJSON(needs.detect-changes.outputs.changed-scopes), 'test-inputs') }}
integration-tests:
needs: [detect-changes]
uses: ./.github/workflows/integration_tests.yml
with:
publish: true
run-tests: ${{ contains(fromJSON(needs.detect-changes.outputs.changed-scopes), 'test-inputs') }}
publish-test-results:
needs:
- detect-changes
- unit-tests
- integration-tests
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
checks: write
# Skip on cancellation so partial artifacts aren't published as failed tests.
if: ${{ !cancelled() && needs.detect-changes.result == 'success' }}
steps:
- name: Skip publishing when tests did not run
if: ${{ !contains(fromJSON(needs.detect-changes.outputs.changed-scopes), 'test-inputs') }}
run: echo "test result publishing skipped because test inputs did not change"
- name: Download Artifacts
if: ${{ contains(fromJSON(needs.detect-changes.outputs.changed-scopes), 'test-inputs') }}
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: artifacts
# Docker build artifacts have to ignored
# https://github.com/actions/toolkit/pull/1874
pattern: "!*.dockerbuild"
- name: Publish Test Results
if: ${{ contains(fromJSON(needs.detect-changes.outputs.changed-scopes), 'test-inputs') }}
uses: EnricoMi/publish-unit-test-result-action@d0a4676d0e0b938bc201470d88276b7c74c712b3 # v2.24.0
with:
comment_mode: off
fail_on: "errors"
files: "artifacts/**/*.xml"