Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
332ae84
test
jdach Mar 14, 2025
687956b
test
jdach Mar 14, 2025
5444c13
test
jdach Mar 14, 2025
ca8f452
test
jdach Mar 14, 2025
1dac0aa
test
jdach Mar 14, 2025
3bcc466
test
jdach Mar 14, 2025
d6b64a0
test
jdach Mar 14, 2025
8e708cb
test
jdach Mar 14, 2025
f1015c8
test
jdach Mar 14, 2025
de89ea6
test
jdach Mar 14, 2025
bc59f2f
test
jdach Mar 14, 2025
923e856
test
jdach Mar 14, 2025
3ae89b1
test
jdach Mar 14, 2025
872b78a
test
jdach Mar 14, 2025
f1b3eb7
test
jdach Mar 14, 2025
1c2891c
test
jdach Mar 14, 2025
dd67003
test
jdach Mar 14, 2025
b508fb7
test
jdach Mar 14, 2025
b66f94a
test
jdach Mar 14, 2025
e6eefd7
test
jdach Mar 14, 2025
497b87d
test
jdach Mar 14, 2025
bd4bf2d
test
jdach Mar 14, 2025
0c24b12
test
jdach Mar 14, 2025
5033486
test
jdach Mar 17, 2025
06106d7
test
jdach Mar 17, 2025
a833a59
Merge branch 'master' into innov-march-gh-actions
jdach Apr 11, 2025
5718b4a
wip
jdach Apr 11, 2025
2f6de89
wip
jdach Apr 11, 2025
fc5f4c7
wip
jdach Apr 11, 2025
ae4d520
wip
jdach Apr 11, 2025
be7862c
wip
jdach Apr 11, 2025
c4931ba
wip
jdach Apr 11, 2025
8658121
wip
jdach Apr 11, 2025
53e18ef
coverage icons!
jdach Apr 11, 2025
702a646
wip
jdach Apr 11, 2025
0cdcc3a
wip
jdach Apr 11, 2025
a04ebcc
wip
jdach Apr 11, 2025
39a18b4
wip
jdach Apr 11, 2025
53dcfab
wip
jdach Apr 11, 2025
c6cde6e
wip
jdach Apr 11, 2025
7238d71
wip
jdach Apr 11, 2025
9e16ff3
wip
jdach Apr 11, 2025
ea58a6a
wip
jdach Apr 11, 2025
deceb82
wip
jdach Apr 11, 2025
df5bd54
wip
jdach Apr 11, 2025
663f55b
wip
jdach Apr 11, 2025
7770713
wip
jdach Apr 11, 2025
fbdfa05
wip
jdach Apr 11, 2025
f97d7fe
wip
jdach Apr 11, 2025
f784145
wip
jdach Apr 11, 2025
0239fd9
wip
jdach Apr 11, 2025
7eaea74
wip
jdach Apr 11, 2025
b0e58f4
wip
jdach Apr 11, 2025
7b521c7
wip
jdach Apr 11, 2025
14249ca
wip
jdach Apr 11, 2025
cb78507
wip
jdach Apr 11, 2025
0272840
wip
jdach Apr 11, 2025
6f3cdb9
wip
jdach Apr 11, 2025
2a812d0
wip
jdach Apr 11, 2025
8b78a59
wip
jdach Apr 11, 2025
597c14d
wip
jdach Apr 11, 2025
7511571
wip
jdach Apr 11, 2025
4f2cd7a
wip
jdach Apr 11, 2025
ad4a703
wip
jdach Apr 11, 2025
fdd4376
wip
jdach Apr 11, 2025
ad508eb
wip
jdach Apr 11, 2025
8050d5b
wip
jdach Apr 11, 2025
6f844c3
wip
jdach Apr 11, 2025
4b57c09
wip
jdach Apr 11, 2025
5abc58d
wip
jdach Apr 11, 2025
579d370
wip
jdach Apr 11, 2025
64b57c3
Merge remote-tracking branch 'origin/innov-march-gh-actions' into inn…
jdach Apr 11, 2025
ebca0b0
wip
jdach Apr 11, 2025
81aaeda
wip
jdach Apr 11, 2025
9af922b
wip
jdach Apr 11, 2025
070db7a
wip
jdach Apr 11, 2025
1cabd39
wip
jdach Apr 11, 2025
d91ffe3
wip
jdach Apr 11, 2025
e87562e
wip
jdach Apr 11, 2025
28928ab
clean up
jdach Apr 11, 2025
2b3f4c9
clean up
jdach Apr 11, 2025
ff9b914
clean up
jdach Apr 11, 2025
9d10254
clean up
jdach Apr 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/actions/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: 'Test Coverage Comment'
description: 'This action comments test coverage on the pr'
runs:
using: 'node20'
main: 'index.js'
40 changes: 40 additions & 0 deletions .github/actions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* istanbul ignore file */
const core = require('@actions/core');
const github = require('@actions/github');

(async () => {
try {
const summaryData = require('../../coverage/coverage-summary.json');
const coverage = summaryData.total.lines.pct;
const icon = coverage < 90 ? '❌' : `✅`;
const token = core.getInput('GITHUB_TOKEN');
const context = github.context;
const pr_number = context.payload.pull_request.number;
const oktokit = github.getOctokit(token);
const pr_id = context.payload.pull_request.id;
const pr_comments_response = await oktokit.rest.issues.listComments({
...context.repo,
issue_number: pr_number,
id: pr_id,
});
const pr_comments = pr_comments_response.data;
const coverage_comment = pr_comments?.find(comment => comment.user.login === 'github-actions[bot]');
if (pr_comments.length > 0 && coverage_comment) {
oktokit.rest.issues.updateComment({
...context.repo,
issue_number: pr_number,
comment_id: coverage_comment.id,
body: `Total Line Coverage: ${coverage}% ${icon}`,
});
} else {
oktokit.rest.issues.createComment({
...context.repo,
issue_number: pr_number,
body: `Total Line Coverage: ${coverage}% ${icon}`,
});
}
} catch (error) {
// Handle errors and indicate failure
core.setFailed(error.message);
}
})();
59 changes: 34 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

name: Run unit and e2e tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
types: [opened, synchronize]
Expand All @@ -23,7 +27,12 @@ jobs:
- name: run tests with coverage
env:
NODE_OPTIONS: "--max_old_space_size=8192"
run: npm run test:coverage
run: npm run test:report
- name: Test Coverage Comment
uses: ./.github/actions
with:
GITHUB_TOKEN: ${{ github.token }}
if: always()
run-branch-unit-tests-and-coverage:
timeout-minutes: 10
runs-on: ubuntu-22.04
Expand All @@ -49,27 +58,27 @@ jobs:
env:
NODE_OPTIONS: "--max_old_space_size=8192"
run: npm run test:branch
run-cypress-tests:
timeout-minutes: 15
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 20
- name: Cypress install
env:
NODE_OPTIONS: "--max_old_space_size=8192"
run: npm install --legacy-peer-deps
- name: Cypress run
uses: cypress-io/github-action@v5
env:
NODE_OPTIONS: "--max_old_space_size=8192"
GITHUB_TOKEN: ${{ github.token }}
with:
install: false
build: npm run build
start: npm run serve
broswer: chrome
# run-cypress-tests:
# timeout-minutes: 15
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Setup Node.js environment
# uses: actions/[email protected]
# with:
# node-version: 20
# - name: Cypress install
# env:
# NODE_OPTIONS: "--max_old_space_size=8192"
# run: npm install --legacy-peer-deps
# - name: Cypress run
# uses: cypress-io/github-action@v5
# env:
# NODE_OPTIONS: "--max_old_space_size=8192"
# GITHUB_TOKEN: ${{ github.token }}
# with:
# install: false
# build: npm run build
# start: npm run serve
# broswer: chrome
Loading
Loading