Skip to content

Playground Editor

Playground Editor #153

Workflow file for this run

name: PR Build
on:
pull_request:
branches: [main]
types: [opened, reopened, synchronize, closed]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install dependencies
run: npm install
- name: Install SFDX
uses: sfdx-actions/setup-sfdx@v1
with:
sfdx-auth-url: ${{ secrets.DEV_HUB_AUTH_URL }}
- name: Populate auth file with SFDX_URL secret
shell: bash
run: echo ${{ secrets.DEV_HUB_AUTH_URL}} > ./SFDX_URL_STORE.txt
- name: Authenticate against dev hub
run: sfdx force:auth:sfdxurl:store --sfdxurlfile=./SFDX_URL_STORE.txt --setalias=devhub --setdefaultdevhubusername
- name: Create scratch org
run: sfdx force:org:create --definitionfile=config/dev.json --setalias=scratch-org --setdefaultusername --nonamespace --durationdays=1
- name: Push source
run: sfdx force:source:push
- name: Run tests
run: sfdx force:apex:test:run --codecoverage --resultformat=tap -w 30
- name: Clean up scratch org
run: sfdx force:org:delete --targetusername=scratch-org --noprompt