Skip to content

Commit be7104f

Browse files
committed
switched to apex-enterprise-patterns/setup-sfdx@v2
1 parent 2bbf25a commit be7104f

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

.github/workflows/deploy.and.test.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,26 @@ jobs:
1616
with:
1717
ref: ${{github.event.pull_request.head.ref}}
1818
repository: ${{github.event.pull_request.head.repo.full_name}}
19-
- name: Install SFDX CLI and authorize DevHub
20-
uses: apex-enterprise-patterns/setup-sfdx@v1 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety
19+
- name: Install SF CLI and authorize DevHub
20+
uses: apex-enterprise-patterns/setup-sfdx@v2 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety
2121
with:
2222
sfdx-auth-url: ${{ secrets.DEVHUB_SFDXURL }}
23-
- run: sfdx force:config:set defaultdevhubusername=SFDX-ENV -g #Even though the setup-sfdx action uses --setdefaultdevhubusername, it doesn't seem to stick since it uses --setdefaultusername so we brute force it here
24-
- run: echo y | sfdx plugins:install shane-sfdx-plugins
25-
- run: sfdx force:org:create -f config/project-scratch-def.json --setdefaultusername -d 1
26-
- run: sfdx shane:github:src:install -c -g apex-enterprise-patterns -r fflib-apex-mocks -p sfdx-source/apex-mocks
27-
- run: sfdx shane:github:src:install -c -g apex-enterprise-patterns -r fflib-apex-common -p sfdx-source/apex-common
28-
- run: sfdx shane:github:src:install -c -g apex-enterprise-patterns -r force-di -p force-di
29-
- run: sfdx shane:github:src:install -c -g apex-enterprise-patterns -r at4dx -p sfdx-source/core
30-
- run: sfdx force:source:push
31-
- run: sfdx force:apex:test:run -w 5
23+
# Install the required plugins
24+
- run: echo y | sf plugins install shane-sfdx-plugins
25+
# Setup the config parameters needed
26+
- run: sf config set target-dev-hub SFDX-ENV --global #Even though the setup-sfdx action uses --setdefaultdevhubusername, it doesn't seem to stick since it uses --setdefaultusername so we brute force it here
27+
# Create the scratch org
28+
- run: sf org create scratch --definition-file config/project-scratch-def.json --set-default --duration-days 1 --no-track-source
29+
# Install required dependency frameworks
30+
- run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-mocks --path sfdx-source/apex-mocks
31+
- run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-common --path sfdx-source/apex-common
32+
- run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo force-di --path force-di
33+
- run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo at4dx --path sfdx-source/core
34+
# Deploy/compile the codebase
35+
- run: sf project deploy start
36+
# Run the core framework tests
37+
- run: sf apex run test --wait 5
3238
- name: Destroy scratch org
33-
run: sfdx force:org:delete -p
39+
run: sf org delete scratch --no-prompt
3440
if: always()
3541

0 commit comments

Comments
 (0)