Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report displays wrong workflow name #40

Open
valeriiatym opened this issue Oct 30, 2021 · 4 comments
Open

Report displays wrong workflow name #40

valeriiatym opened this issue Oct 30, 2021 · 4 comments

Comments

@valeriiatym
Copy link

I have several yml files with workflows

1 Workflow with name "Build App"
2. Workflow with name "Run Unit Tests" + publish xcresulttool report -> if: failure()
3. Workflow with name "Run Integration Tests" + publish xcresulttool report -> if: success() || failure()
4. Workflow with name "Run UI Tests" + publish xcresulttool report -> if: success() || failure()

I use xcresulttool as a step of the job inside one workflow, e.g.:

name: RegressionTests

on:
 workflow_run:
    workflows: ["RunBuild"]
    types:
      - completed
 repository_dispatch:
    types: [trigger-tests]
 pull_request:
    branches: [ 'develop' ]

concurrency:
 group: run-tests-${{ github.head_ref }}
 cancel-in-progress: true

jobs:
  TestSuite:
    runs-on: self-hosted

    steps:
      - name: Set Global Variables
        run: |
          echo "LC_ALL=en_US.UTF-8" >> $GITHUB_ENV
          echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
      - uses: actions/checkout@v2
        with:
          ref: ${{ github.event.client_payload.ref }}
      - run: echo ${{ github.event.client_payload.sha }}
    
      - name: Gem caching
        id: gem_cache
        uses: actions/cache@v2
        continue-on-error: true
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-
            
      - name: Running Test Suite
        uses: maierj/[email protected]
        with:
          lane: "run_tests"
          bundle-install-path: "vendor/bundle"
        
      - name: Publish Test Report
        uses: kishikawakatsumi/[email protected]
        if: success() || failure()
        with:
          title: TestReport
          path: build/DerivedData/test_output/report.xcresult
  
      - name: Trigger Next Step
        if: success()
        uses: peter-evans/repository-dispatch@v1
        with:
          token: ${{ secrets.REPO_TRIGGER_PAT }}
          repository: ${{ github.repository }}
          event-type: trigger-build
          client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

When I push some changes it triggers the run of these workflows.
But when the report publishes, it contains the wrong workflow name

(-) Actual Result:

Run Unit Tests / IntegrationTestReport (pull_request) — Xcode test results
Run Integration Tests / UnitTestReport (pull_request) — Xcode test results

(+) Expected Result:

Run Unit Tests / UnitTestReport (pull_request) — Xcode test results
Run Integration Tests / IntegrationTestReport (pull_request) — Xcode test results

@valeriiatym valeriiatym changed the title Report displayed with wrong workflow name Report displays wrong workflow name Oct 30, 2021
@asiliuk
Copy link

asiliuk commented Dec 9, 2021

Not sure if this is the same problem, but I have something similar
We have a job to cancel previously started workflows and report is added to that job instead of CI job who actually called it
image

@valeriiatym
Copy link
Author

Yes, it's the same case.

@simondelphia
Copy link

Experiencing same problem

@AlexPerathoner
Copy link

Me too.
Here's what I found: xcresulttool uses octokit, which offers a method to call this API endpoint.
Unfortunately, there is no argument to specify which check suite the check should be added to.

In fact, as stated in this discussion, it's currently impossible to do. Please show activity on that thread, maybe the priority team will re-evaluate their decisions...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants