Eliminate RIB query from list processing #118
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
# Validates a feature branch is deployable prior to merging into main | |
# Carries out the following in parallel: | |
# 1. Run all Jest tests | |
# 2. Create a scratch org WITHOUT package namespace, deploy and run all apex tests | |
# 3. Create scratch orgs WITH package namespace, deploy and run all apex tests | |
name: Validate Branch is Deployable | |
# Run only on demand or on PRs to main | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
env: | |
JWT_SIGNING_KEY: ${{ secrets.JWT_SIGNING_KEY }} | |
CONSUMER_KEY: ${{ secrets.ISV_DEV_HUB_CONSUMER_KEY }} | |
DEV_HUB_USERNAME: ${{ secrets.ISV_DEV_HUB_USERNAME }} | |
jobs: | |
run-jest-tests: | |
name: Run Jest Tests | |
runs-on: ubuntu-latest | |
container: salesforce/salesforcedx:latest-full | |
steps: | |
- name: 'Checkout source code' | |
uses: actions/checkout@v2 | |
- name: Install Jest | |
run: | | |
sf force:lightning:lwc:test:setup # ERROR: Unable to convert this command; you must convert it manually. | |
- name: Run all Jest tests | |
run: | | |
sf force:lightning:lwc:test:run # ERROR: Unable to convert this command; you must convert it manually. | |
deploy-and-test-without-namespace: | |
name: Deploy and Test No Namespace | |
runs-on: ubuntu-latest | |
container: salesforce/salesforcedx:latest-full | |
steps: | |
- name: 'Checkout source code' | |
uses: actions/checkout@v2 | |
- name: Authenticate and set default DevHub | |
run: | | |
echo "$JWT_SIGNING_KEY" > server.key | |
sf org login jwt --client-id $CONSUMER_KEY --jwt-key-file server.key --username $DEV_HUB_USERNAME --set-default-dev-hub --alias devhub | |
shell: bash | |
- name: Create scratch org | |
run: | | |
sf force org create --definitionfile config/project-scratch-def.json --setdefaultusername --durationdays 1 | |
- name: Push source | |
run: | | |
sf project deploy start | |
- name: Assign permission sets | |
run: | | |
sf org assign permset --name FormulaShare_Admin_User | |
sf org assign permset --name FormulaShare_Sample_App_Permissions | |
- name: Run all apex tests | |
run: | | |
sf apex run test --synchronous | |
- name: Delete scratch org | |
run: | | |
sf force org delete --no-prompt |