Skip to content

Commit

Permalink
TEST-0004 Fix frontend CI and playwright test conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
hwinther committed Jun 29, 2024
1 parent 7f25e59 commit f5de4f8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/actions/frontend-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ inputs:
required: false
description: npm|yarn
default: "yarn"
run_tests:
required: false
description: true|false
default: "false"

runs:
using: "composite"
Expand Down Expand Up @@ -150,12 +154,15 @@ runs:
tags: "TODO:,FIXME:,BUG:"

- name: vitest
if: ${{ env.run_tests == 'true' }}
shell: bash
working-directory: ${{ inputs.working_directory }}
run: yarn coverage

- uses: dorny/test-reporter@v1
- name: Test reporter
uses: dorny/test-reporter@v1
id: test-reporter
if: ${{ env.run_tests == 'true' }}
with:
name: "Frontend Tests"
working-directory: ${{ inputs.working_directory }}
Expand All @@ -165,6 +172,7 @@ runs:

- name: Code Coverage Report
uses: irongut/[email protected]
if: ${{ env.run_tests == 'true' }}
with:
filename: "src/frontend/coverage/cobertura-coverage.xml"
badge: true
Expand All @@ -180,6 +188,7 @@ runs:
id: code-coverage-summary
shell: bash
working-directory: ${{ inputs.working_directory }}
if: ${{ env.run_tests == 'true' }}
run: |
cat ../../code-coverage-results.md >> $GITHUB_STEP_SUMMARY
echo "markdown<<EOF" >> $GITHUB_OUTPUT
Expand All @@ -188,7 +197,7 @@ runs:
- name: "Create or Update PR Comment"
uses: im-open/[email protected]
if: ${{ always() && github.event_name == 'pull_request' }}
if: ${{ env.run_tests == 'true' && always() && github.event_name == 'pull_request' }}
with:
github-token: ${{ env.GH_TOKEN }}
comment-identifier: "${{ env.WORKFLOW_SHORT_NAME }}-CodeCoverageSummary"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ jobs:
- uses: ./.github/actions/frontend-build
with:
working_directory: ${{ env.FRONTEND_PATH }}
run_tests: "true"

0 comments on commit f5de4f8

Please sign in to comment.