From be7104f8d2dca291f4924744cd2aa254bff5f654 Mon Sep 17 00:00:00 2001 From: "John M. Daniel" Date: Tue, 19 Dec 2023 00:16:37 -0500 Subject: [PATCH] switched to `apex-enterprise-patterns/setup-sfdx@v2` --- .github/workflows/deploy.and.test.yml | 30 ++++++++++++++++----------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.and.test.yml b/.github/workflows/deploy.and.test.yml index 1d17eb7..1bfe36e 100644 --- a/.github/workflows/deploy.and.test.yml +++ b/.github/workflows/deploy.and.test.yml @@ -16,20 +16,26 @@ jobs: with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} - - name: Install SFDX CLI and authorize DevHub - uses: apex-enterprise-patterns/setup-sfdx@v1 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety + - name: Install SF CLI and authorize DevHub + uses: apex-enterprise-patterns/setup-sfdx@v2 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety with: sfdx-auth-url: ${{ secrets.DEVHUB_SFDXURL }} - - 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 - - run: echo y | sfdx plugins:install shane-sfdx-plugins - - run: sfdx force:org:create -f config/project-scratch-def.json --setdefaultusername -d 1 - - run: sfdx shane:github:src:install -c -g apex-enterprise-patterns -r fflib-apex-mocks -p sfdx-source/apex-mocks - - run: sfdx shane:github:src:install -c -g apex-enterprise-patterns -r fflib-apex-common -p sfdx-source/apex-common - - run: sfdx shane:github:src:install -c -g apex-enterprise-patterns -r force-di -p force-di - - run: sfdx shane:github:src:install -c -g apex-enterprise-patterns -r at4dx -p sfdx-source/core - - run: sfdx force:source:push - - run: sfdx force:apex:test:run -w 5 + # Install the required plugins + - run: echo y | sf plugins install shane-sfdx-plugins + # Setup the config parameters needed + - 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 + # Create the scratch org + - run: sf org create scratch --definition-file config/project-scratch-def.json --set-default --duration-days 1 --no-track-source + # Install required dependency frameworks + - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-mocks --path sfdx-source/apex-mocks + - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo fflib-apex-common --path sfdx-source/apex-common + - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo force-di --path force-di + - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo at4dx --path sfdx-source/core + # Deploy/compile the codebase + - run: sf project deploy start + # Run the core framework tests + - run: sf apex run test --wait 5 - name: Destroy scratch org - run: sfdx force:org:delete -p + run: sf org delete scratch --no-prompt if: always()