Skip to content

Commit

Permalink
Merge pull request #45 from gentlementlegen/development
Browse files Browse the repository at this point in the history
fix: Jest / Cypress now triggers after build, and release-please targets the main branch
  • Loading branch information
gentlementlegen authored Jun 5, 2024
2 parents 1874bc7 + 16b3090 commit f19366e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/cypress-testing.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Run Cypress testing suite
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
workflow_run:
workflows: ["Build"]
types:
- completed

jobs:
cypress-run:
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/jest-testing.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Run Jest testing suite
on:
workflow_dispatch:
pull_request_target:
types: [opened, synchronize]
workflow_run:
workflows: ["Build"]
types:
- completed

env:
NODE_ENV: "test"
Expand All @@ -15,19 +17,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "20.10.0"

- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Build & Run test suite
run: |
yarn
yarn test | tee ./coverage.txt && exit ${PIPESTATUS[0]}
- name: Jest Coverage Comment

- name: Jest With Coverage Comment
# Ensures this step is run even on previous step failure (e.g. test failed)
if: always()
uses: MishaKav/jest-coverage-comment@main
uses: ArtiomTr/jest-coverage-report-action@v2
with:
coverage-summary-path: coverage/coverage-summary.json
junitxml-path: junit.xml
junitxml-title: JUnit
coverage-path: ./coverage.txt
package-manager: yarn
prnumber: ${{ github.event.pull_request.number || github.event.workflow_run.pull_requests[0].number }}
4 changes: 2 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
branches:
- $default-branch
- main

permissions:
contents: write
Expand All @@ -17,7 +17,7 @@ jobs:
- uses: google-github-actions/release-please-action@v3
with:
release-type: node
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.10.0"
Expand Down

2 comments on commit f19366e

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.❔
Category Percentage Covered / Total
🟒 Statements 80% 4/5
🟒 Branches 100% 0/0
🟑 Functions 66.67% 2/3
🟒 Lines 80% 4/5

Test suite run success

1 tests passing in 1 suite.

Report generated by πŸ§ͺjest coverage report action from f19366e

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.❔
Category Percentage Covered / Total
🟒 Statements 80% 4/5
🟒 Branches 100% 0/0
🟑 Functions 66.67% 2/3
🟒 Lines 80% 4/5

Test suite run success

1 tests passing in 1 suite.

Report generated by πŸ§ͺjest coverage report action from f19366e

Please sign in to comment.