Skip to content

Update README.md

Update README.md #91

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: SFDX-Example-CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [master]
pull_request:
types: [synchronize, ready_for_review]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
env:
NODE_VERSION: 18
PMD_RULESET_FILE: "./pmd-apex-ruleset.xml"
PMD_RESULT_FILE: "./pmd-result.xml"
ORG_ALIAS: "sfdx-example"
ADMIN_EMAIL: "merv@merv.org.uk"
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Install Node
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- run: |
echo "${GITHUB_WORKSPACE}/node_modules/.bin" >> $GITHUB_PATH
npm ci
# Install Salesforce CLI
- name: Install Salesforce CLI
run: |
npm install -g @salesforce/cli
echo "${GITHUB_WORKSPACE}/node_modules/.bin" >> $GITHUB_PATH
sf --version
# Install SFDX Scanner
- name: Install SFDX Scanner
run: sf plugins install @salesforce/sfdx-scanner
# sf code scanner
- name: run sf scanner
run: sf scanner:run --target force-app -f table -s 2 --normalize-severity
# Authorise devhub
- name: Autenticate DevHub
run: |
echo "${{ secrets.SERVER_KEY }}" > "server.key"
sf org login jwt -i ${{ secrets.CONSUMER_KEY }} -f server.key -o ${{ secrets.USERNAME }} -d -a hub-org
# Build Scratch Org
- name: Run org_builder
uses: actions/setup-python@v3
with:
python-version: "3.10"
cache: "pip"
- run: pip install -r requirements.txt
- run: python org_builder.py -a ${{ env.ORG_ALIAS }} -d 1 -e ${{ env.ADMIN_EMAIL }} -v hub-org --debug
# Run tests
- name: Run Tests
run: sf apex run test -r human -w 5 -l RunLocalTests -c -v