Skip to content

Commit

Permalink
ci: add sf-v2 dimension in e2e test and release test
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon committed Sep 5, 2023
1 parent e3df413 commit 877b467
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 9 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/on-main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 877b467

Please sign in to comment.