Comments (9)
I would need to see more logs for that, possibly with a sample to try to see why that may be the case.
An example build where such annotations are generated from this repos tests: https://github.com/mikepenz/action-junit-report/actions/runs/5304280643
And this is from the samples with a configuration like: https://github.com/mikepenz/action-junit-report/blob/main/.github/workflows/build.yml#L18-L25
from action-junit-report.
By default the action will create the annotations via the checks API of GitHub: https://github.com/mikepenz/action-junit-report/blob/main/src/annotator.ts#L85-L102
Would you like to see annotations within the test files? or your aim is to have the report of files which failed in the summary.
For the later you want to enable this by setting detailed_summary
to true
from action-junit-report.
Unfortunately, there are no annotations created in my Job Summary like in this example. https://github.com/mikepenz/action-junit-report/blob/main/.github/images/annotations.png
As you may see at my first screen I have only 1 annotation that build failed
from action-junit-report.
@mikepenz
I think there is a problem when workflow is triggered by workflow_dispatch:
When I run wf from github UI
or rest call
I get no failed tests in anotations:
When workflow is run on call
, or on push
: I see failed tests in anotations:
In my configuration I have 2 workflows where first is calling second:
First wf:
---
name: Tests workflow caller
on:
push:
branches: [ main ]
workflow_dispatch:
workflow_call:
schedule:
- cron: '13 */1 * * *'
pull_request:
branches: [ main ]
paths: "**/tests_caller.yml"
permissions:
actions: read
checks: write
contents: write
issues: read
packages: write
pull-requests: write
statuses: read
security-events: write
id-token: write
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}-${{ github.event_name }}-dev
cancel-in-progress: true
jobs:
dev-api-e2e-tests:
name: run tests workflow
uses: ./.github/workflows/tests.yml
with:
environment: dev
secrets: inherit
Second workflow where actual tests are running:
---
name: Test
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment'
type: string
default: dev
required: true
workflow_call:
inputs:
environment:
description: 'Environment'
type: string
required: true
permissions:
contents: read
checks: write
# id-token: write
jobs:
runIntegrationTests:
name: e2e tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: "Checkout Code"
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: "Make gradlew executable"
run: |
chmod +x ./gradlew
- name: Run Integration Test
run: ./gradlew test --info
- name: Publish Test Report
uses: mikepenz/[email protected]
if: success() || failure() # always run even if the previous step fails
with:
check_name: JUnit Test Report
report_paths: '**/build/test-results/test/TEST-*.xml'
summary: '<table><thead><tr><th> Application (src/applications) </th></tr></thead><tbody><tr><td> test </td></tr></tbody></table>'
check_title_template: '{{SUITE_NAME}} | {{TEST_NAME}}'
detailed_summary: true
- name: Some extra step
run: echo "Test finished on ${{ inputs.environment }}"
from action-junit-report.
same issue with run on schedule
from action-junit-report.
Ok sorry for the late answer. Tested it now here: https://github.com/mikepenz/action-junit-report/actions/runs/5552550460
And it actually makes sense. Given there is no PR - so the action has no place where it can actually create the check for. Like how it would do here: https://github.com/mikepenz/action-junit-report/actions/runs/5552522553
So for this particular usecase I'd suggest to use annotate_only
.
Which will result in an output like this: https://github.com/mikepenz/action-junit-report/actions/runs/5552618163
from action-junit-report.
(E.g. 0a5b1eb)
from action-junit-report.
Thank you @mikepenz
annotate_only: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}}
- works in my case
from action-junit-report.
That's great to hear!
from action-junit-report.
Related Issues (20)
- Doesn't include errors HOT 3
- Option to not parse the annotations if number of failures is high HOT 1
- support "ignored" attribute HOT 5
- Source of file and line attributes HOT 5
- Different line number representation (xunit) HOT 3
- Weird behavior with multiple `report_paths` and failures not being processed HOT 4
- Test report stopped working without change HOT 8
- require_tests flag is not working HOT 5
- Editor points out that github_token is required HOT 1
- Skipped tests are show as passed when included_passed set to true HOT 3
- Test failures not correctly recognized HOT 8
- action using deprecate 'set-output' command HOT 2
- Documentation for Maven Surefire HOT 2
- Out of memory error on large project HOT 14
- Check Run Not Created when update_check: true HOT 2
- act error: Error: The runs.using key in action.yml must be one of: [composite docker node12 node16], got node20 HOT 4
- Invalid character entity when using with dastardly HOT 6
- Error: Converting circular structure to JSON HOT 9
- Option to explicitly fail check run HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-junit-report.