From 877b467bb11a385e7e42a0ed2bb3b26ed9bc466f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Colladon?= Date: Tue, 5 Sep 2023 16:39:30 +0200 Subject: [PATCH] ci: add sf-v2 dimension in e2e test and release test --- .github/workflows/on-main-push.yml | 20 ++++++++++++++++---- .github/workflows/on-pull-request.yml | 24 +++++++++++++++++++----- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.github/workflows/on-main-push.yml b/.github/workflows/on-main-push.yml index 4e4bb6c4..d09f0473 100644 --- a/.github/workflows/on-main-push.yml +++ b/.github/workflows/on-main-push.yml @@ -57,6 +57,7 @@ jobs: matrix: os: [macos-latest, windows-latest, ubuntu-latest] node: [16, 18, 20] + cli: [sf, sfdx] runs-on: ${{ matrix.os }} steps: - name: Checkout sources @@ -71,18 +72,29 @@ jobs: node-version: ${{ matrix.node }} - name: Install sfdx-cli + if: matrix.cli == 'sfdx' run: npm install -g sfdx-cli - - name: Install new plugin version - run: echo y | sfdx plugins:install sfdx-git-delta@${{ needs.prepare-release.outputs.version }} + - name: Install new plugin version via sfdx + if: matrix.cli == 'sfdx' + run: echo y | ${{matrix.cli}} plugins:install sfdx-git-delta@${{ needs.prepare-release.outputs.version }} + + - name: Install sf-v2 + if: matrix.cli == 'sf' + run: npm install -g @salesforce/cli + + - name: Install new plugin version via sf-v2 + if: matrix.cli == 'sf' + run: echo y | ${{matrix.cli}} plugins install sfdx-git-delta@${{ needs.prepare-release.outputs.version }} - name: Test new plugin version - run: sfdx sgd:source:delta --help + run: ${{matrix.cli}} sgd:source:delta --help - name: E2E Tests run: | yarn - yarn test:e2e + ${{matrix.cli}} sgd:source:delta --from \"origin/e2e/base\" --to \"origin/e2e/head\" --output expected --generate-delta --repo . --include .sgdinclude --include-destructive .sgdincludeDestructive --ignore .sgdignore --ignore-destructive .sgdignoreDestructive + perf: needs: prepare-release diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index 211d7a5b..98965df4 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -126,13 +126,14 @@ jobs: uses: ./.github/workflows/reusable-build.yml secrets: inherit - e2e-check: + e2e-check-sfdx-cli: needs: [build] strategy: fail-fast: false matrix: os: [macos-latest, windows-latest, ubuntu-latest] node: [16, 18, 20] + cli: [sf, sfdx] runs-on: ${{ matrix.os }} steps: - name: Checkout sources @@ -160,13 +161,26 @@ jobs: run: yarn pack - name: Install sfdx-cli + if: matrix.cli == 'sfdx' run: npm install -g sfdx-cli - - name: Install plugin + - name: Install plugin via sfdx + if: matrix.cli == 'sfdx' run: | yarn set version classic - sfdx plugins:link . - sfdx plugins + ${{matrix.cli}} plugins:link . + ${{matrix.cli}} plugins + + - name: Install sf-v2 + if: matrix.cli == 'sf' + run: npm install -g @salesforce/cli + + - name: Install plugin via sf-v2 + if: matrix.cli == 'sf' + run: | + yarn set version classic + ${{matrix.cli}} plugins link . + ${{matrix.cli}} plugins - name: Checkout e2e test subject uses: actions/checkout@v3 @@ -179,4 +193,4 @@ jobs: working-directory: ./e2e run: | yarn - yarn test:e2e + ${{matrix.cli}} sgd:source:delta --from \"origin/e2e/base\" --to \"origin/e2e/head\" --output expected --generate-delta --repo . --include .sgdinclude --include-destructive .sgdincludeDestructive --ignore .sgdignore --ignore-destructive .sgdignoreDestructive