Run Apex Tests #40
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
name: Run Apex Tests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 8 * * *' | |
jobs: | |
run-apex-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install SFDX | |
run: | | |
npm i -g @salesforce/cli | |
sf --version | |
- name: Create Auth File | |
run: | | |
echo '{"sfdxAuthUrl": "${{ secrets.SF_AUTH_URL }}"}' > authFile.json | |
- name: Authenticate | |
run: | | |
sf org login sfdx-url --sfdx-url-file "authFile.json" --set-default-dev-hub --alias DevHub | |
- name: Run Apex Tests | |
run: | | |
sf apex run test --target-org DevHub --synchronous --code-coverage -r human |