Skip to content

Commit d4db8de

Browse files
committed
#260 - let's try using shane's plugin for installing the fflib-apex-mocks dependency rather than my clever jq munging of sfdx-project.json
1 parent c1e5c03 commit d4db8de

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
name: Create a Scratch Org, Push Source and Run Apex Tests
22

3-
on: [push]
4-
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
59
jobs:
610
build:
711

812
runs-on: ubuntu-latest
913

1014
steps:
1115
- uses: actions/checkout@v2 #Check out this repo
12-
- uses: actions/checkout@v2 #Checkout fflib-apex-mocks as a sibling of this repo
13-
with:
14-
repository: apex-enterprise-patterns/fflib-apex-mocks
15-
path: fflib-apex-mocks
16-
- name: Hack the sfdx-project.json to prepend the second package directory for fflib-apex-mocks
17-
run: cat sfdx-project.json | jq '.packageDirectories = [{path:"fflib-apex-mocks/sfdx-source"}] + .packageDirectories' > sfdx-project2.json
18-
- run: mv sfdx-project2.json sfdx-project.json
19-
- run: cat sfdx-project.json
2016
- name: Install SFDX CLI and authorize DevHub
2117
uses: apex-enterprise-patterns/setup-sfdx@v1 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety
2218
with:
2319
sfdx-auth-url: ${{ secrets.DEVHUB_SFDXURL }}
2420
- 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
21+
- run: echo y | sfdx plugins:install shane-sfdx-plugins
22+
- run: sfdx shane:github:src:install -g apex-enterprise-patterns -r fflib-apex-mocks
2523
- run: sfdx force:org:create -f config/project-scratch-def.json --setdefaultusername -d 1
2624
- run: sfdx force:source:push
2725
- run: sfdx force:apex:test:run -w 5

0 commit comments

Comments
 (0)