Skip to content

Add more maxPerfModeKeys and realated tests #177

Add more maxPerfModeKeys and realated tests

Add more maxPerfModeKeys and realated tests #177

Workflow file for this run

name: Build, lint & test with coverage capture
on:
push:
branches: [ core-*-patch, main, release ]
pull_request:
branches: [ core-*-patch, main, release ]
env:
GITHUB_PR_NUMBER: ${{github.event.number}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
Run-linter:
runs-on: salesforce-Ubuntu
steps:
- uses: actions/checkout@v3
- name: Setup workspace
uses: ./.github/actions/setup-workspace
- name: Run linting
run: yarn lint
Run-all-tests:
runs-on: salesforce-Ubuntu
steps:
- uses: actions/checkout@v3
- name: Setup workspace
uses: ./.github/actions/setup-workspace
- name: Run Node tests in Jest with coverage collection
run: |
yarn coverage:jest
- name: Run DOM tests in Karma with coverage collection
run: |
yarn coverage:karma
- name: Run merge & generate report
run: |
yarn coverage:report
- name: Checkout pages branch
run: |
git fetch;
git checkout -b pages origin/pages
# All of this is necessary because github pages doesn't provide a way to display artifacts as circle-ci does
# https://github.com/actions/upload-artifact/issues/14
- name: Copy coverage report to pages/coverage-reports and commit to pages branch
run: |
if [ -d "coverage/report" ]; then
[ "$GITHUB_PR_NUMBER" == "" ] && NEW_COVERAGE_SUBJECT=$(git branch --show-current) || NEW_COVERAGE_SUBJECT=$GITHUB_PR_NUMBER;
NEW_COVERAGE_PATH=pages/coverage-reports/${NEW_COVERAGE_SUBJECT}/$(date +%s%N);
mkdir -p $NEW_COVERAGE_PATH;
cp -r coverage/report/* ${NEW_COVERAGE_PATH}/;
git status;
git add ${NEW_COVERAGE_PATH}/. --force;
git status;
git -c user.name="github-actions[bot]" -c user.email="github-actions[bot]@users.noreply.github.com" \
commit -m "$NEW_COVERAGE_PATH" \
--author="${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>" --no-verify;
git status;
git push origin pages --no-verify -f;
echo "NEW_COVERAGE_PATH=$NEW_COVERAGE_PATH" >> $GITHUB_ENV
fi
- uses: actions/checkout@v3
with:
clean: false
# This must follow the checkout back to the PR branch as it relies on vars set for that branch
- name: Comment on PR with test coverage report table and link
run: |
node scripts/ci/post-coverage-to-pr.mjs;