v1.6.27 - Concat Delimiter Supports New Line #791
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unique name for this workflow | |
name: Rollup Release Status | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'sfdx-project.json' | |
- '**/README.md' | |
- 'Contributing.md' | |
- 'CODE_OF_CONDUCT.md' | |
- 'package.json' | |
- 'LICENSE' | |
- 'media/**' | |
- '.gitignore' | |
- '.prettierignore' | |
- '.prettierrc' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths-ignore: | |
- 'sfdx-project.json' | |
- '**/README.md' | |
- 'Contributing.md' | |
- 'CODE_OF_CONDUCT.md' | |
- 'package.json' | |
- 'LICENSE' | |
- 'media/**' | |
- '.gitignore' | |
- '.prettierignore' | |
- '.prettierrc' | |
jobs: | |
scratch-org-test: | |
runs-on: ubuntu-latest | |
environment: Test | |
steps: | |
# Checkout the code | |
- name: 'Checkout source code' | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: 'Setup node' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'npm' | |
- name: 'Install NPM' | |
run: npm ci | |
- name: 'Run LWC Unit Tests' | |
run: npm run test:lwc | |
- name: 'Upload code coverage for LWC to Codecov.io' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: LWC | |
- name: 'Delete LWC test files after codecov upload' | |
run: | | |
rm coverage/ -rf | |
- name: Install & run SFDX Scanner | |
run: npm run scan | |
# Authenticate using JWT flow | |
- name: 'Auth to dev hub' | |
shell: bash | |
run: | | |
echo "${{ env.DEVHUB_SERVER_KEY }}" > ./jwt-server.key | |
npx sf org login jwt --client-id ${{ env.DEVHUB_CONSUMER_KEY }} --username ${{ env.DEVHUB_USERNAME }} --jwt-key-file ./jwt-server.key --set-default-dev-hub | |
npx sf config set target-org ${{ env.DEVHUB_USERNAME }} | |
env: | |
DEVHUB_USERNAME: ${{ secrets.DEVHUB_USERNAME }} | |
DEVHUB_CONSUMER_KEY: ${{ secrets.DEVHUB_CONSUMER_KEY }} | |
DEVHUB_SERVER_KEY: ${{ secrets.DEVHUB_SERVER_KEY }} | |
- name: 'Deploy & Test' | |
id: 'deploy' | |
shell: pwsh | |
run: '. ./scripts/test.ps1' | |
- name: 'Possible Scratch Org Cleanup' | |
if: ${{ failure() && steps.deploy.conclusion == 'failure' }} | |
run: | | |
npm run delete:org | |
exit 1 | |
# Delete temporary test files that Codecov is unable to parse | |
- name: 'Delete unparseable test coverage' | |
run: rm ./tests/apex/test-result-707*-codecoverage.json -f | |
# Upload Apex code coverage data | |
- name: 'Upload Apex code coverage for Apex to Codecov.io' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: Apex | |
verbose: true | |
# Only create new package versions if a PR is pointed to main or we are merging to main | |
- name: 'Package & Promote' | |
shell: pwsh | |
if: ${{ env.SHOULD_CREATE_AND_PROMOTE == '1' && github.actor == github.event.repository.owner.login && (github.base_ref == 'main' || github.ref == 'refs/heads/main') }} | |
run: '. ./scripts/build-and-promote-package.ps1' | |
env: | |
SHOULD_CREATE_AND_PROMOTE: ${{ secrets.SHOULD_CREATE_AND_PROMOTE }} | |
# Package versions are only created automatically within PRs that are pointed to main | |
# so those are the only times we need to update the README /sfdx-project.json and package.json | |
- name: 'Re-commit updated package version (if necessary)' | |
if: ${{ github.ref != 'refs/heads/main' && env.SHOULD_CREATE_AND_PROMOTE == '1' && github.actor == github.event.repository.owner.login && github.base_ref == 'main' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SHOULD_CREATE_AND_PROMOTE: ${{ secrets.SHOULD_CREATE_AND_PROMOTE }} | |
run: 'sh ./scripts/updateGithubCommitStatus.sh' |