Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
devpow112 committed Nov 27, 2024
1 parent 1996946 commit 84513fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: npm run build
- name: Handle changes (pull request)
uses: Brightspace/third-party-actions@peter-evans/create-pull-request
if: github.triggering_actor != 'd2l-github-action-tokens[bot]'
if: github.triggering_actor != 'devpow112'
id: changes-pr
with:
commit-message: Update Build
Expand All @@ -73,7 +73,7 @@ jobs:
add-paths: dist/*
- name: Leave comment
if: >
github.triggering_actor != 'd2l-github-action-tokens[bot]' &&
github.triggering_actor != 'devpow112' &&
steps.changes-pr.outputs.pull-request-operation == 'created'
uses: BrightspaceUI/actions/comment-on-pr@main
with:
Expand All @@ -84,7 +84,7 @@ jobs:
post-mode: hide-previous
- name: Report status
if: >
github.triggering_actor != 'd2l-github-action-tokens[bot]' &&
github.triggering_actor != 'devpow112' &&
(
steps.changes-pr.outputs.pull-request-operation == 'created' ||
steps.changes-pr.outputs.pull-request-operation == 'updated'
Expand All @@ -94,10 +94,10 @@ jobs:
script: core.setFailed('Build changes detected')
- name: Handle changes (push)
id: changes-push
if: github.triggering_actor == 'd2l-github-action-tokens[bot]'
if: github.triggering_actor == 'devpow112'
run: |
set +e
git diff --exit-code 'dist/*'
git diff --exit-code --name-only 'dist/*'
RESULT="$?"
set -e
if [[ "$RESULT" -eq 0 ]]; then
Expand All @@ -108,9 +108,10 @@ jobs:
echo "exist=true" >> $GITHUB_OUTPUT
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git fetch -n origin $GITHUB_HEAD_REF
git add 'dist/*'
git commit -m 'Update Build'
git push -f "https://${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY" $GITHUB_REF
git push -f "https://$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY" "$GITHUB_HEAD_REF"
env:
GITHUB_TOKEN: ${{secrets.PR_MANAGE_TOKEN}}
- name: Approve
Expand Down
13 changes: 5 additions & 8 deletions src/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,8 @@ const makeDetailRecord = (detail) => {
location,
retries,
timeout,
duration: {
total,
final
},
status,
duration: { total, final },
browser,
type,
experience,
Expand Down Expand Up @@ -187,7 +184,7 @@ const makeDetailWriteRequests = (report) => {
return writeRequests;
};

const assumeRole = async(region, credentials, arn, sessionName, duration, tags) => {
const assumeRole = async (region, credentials, arn, sessionName, duration, tags) => {
const client = new STSClient({ region, credentials });
const command = new AssumeRoleCommand({
RoleArn: arn,
Expand All @@ -205,7 +202,7 @@ const assumeRole = async(region, credentials, arn, sessionName, duration, tags)
};
};

const writeTimestream = async(region, credentials, requests) => {
const writeTimestream = async (region, credentials, requests) => {
const client = new TimestreamWriteClient({ credentials, region });

for (const request of requests) {
Expand All @@ -215,7 +212,7 @@ const writeTimestream = async(region, credentials, requests) => {
}
};

const finalize = async(logger, context, inputs) => {
const finalize = async (logger, context, inputs) => {
logger.startGroup('Finalize test report');

const { reportPath, injectGitHubContext, lmsBuildNumber, lmsInstanceUrl, debug } = inputs;
Expand Down Expand Up @@ -273,7 +270,7 @@ const finalize = async(logger, context, inputs) => {
return report;
};

const submit = async(logger, context, inputs, report) => {
const submit = async (logger, context, inputs, report) => {
logger.startGroup('Submit report');
logger.info('Generate summary write request');

Expand Down

0 comments on commit 84513fa

Please sign in to comment.