From 845e58cf1db02a3ebc9b06b2724e6e7f946f3b2f Mon Sep 17 00:00:00 2001 From: Nicolas Kruk Date: Wed, 20 Nov 2024 15:01:11 -0500 Subject: [PATCH] fix: typescript errors not showing in CI --- .github/workflows/build.yml | 39 ++++++++++++++++++++++ .github/workflows/failureNotifications.yml | 12 +++---- src/commands/lightning/dev/site.ts | 6 ++-- 3 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d75a6f6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: build + +on: + pull_request: + push: + branches: + - main + - '*-patch' + +jobs: + determine-node-versions: + outputs: + nodeVersions: ${{ steps.determine-node-versions.outputs.nodeVersions }} + runs-on: ubuntu-latest + steps: + - uses: salesforcecli/github-workflows/.github/actions/determineNodeVersions@main + id: determine-node-versions + with: + nodeVersionOverride: ${{ vars.NODE_VERSION_OVERRIDE }} # default is 'lts/*' and 'lts/-1' + nodeDisableCurrent: ${{ vars.UT_DISABLE_NODE_CURRENT }} # default is falsy + nodeDisablePrevious: ${{ vars.UT_DISABLE_NODE_PREVIOUS }} # default is falsy + + build: + needs: determine-node-versions + strategy: + matrix: + node_version: ${{ fromJSON(needs.determine-node-versions.outputs.nodeVersions) }} + fail-fast: false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node_version }} + + - run: yarn install + + - run: yarn build diff --git a/.github/workflows/failureNotifications.yml b/.github/workflows/failureNotifications.yml index 6aa51c2..15cbefc 100644 --- a/.github/workflows/failureNotifications.yml +++ b/.github/workflows/failureNotifications.yml @@ -1,12 +1,12 @@ name: failureNotifications on: workflow_dispatch: -# workflow_run: -# workflows: -# - publish -# - create-github-release -# types: -# - completed + workflow_run: + workflows: + - publish + - create-github-release + types: + - completed jobs: failure-notify: runs-on: ubuntu-latest diff --git a/src/commands/lightning/dev/site.ts b/src/commands/lightning/dev/site.ts index c7fcb0f..6fbfe42 100644 --- a/src/commands/lightning/dev/site.ts +++ b/src/commands/lightning/dev/site.ts @@ -7,7 +7,7 @@ import fs from 'node:fs'; import { SfCommand, Flags } from '@salesforce/sf-plugins-core'; import { Messages } from '@salesforce/core'; -import { expDev, setupDev } from '@lwrjs/api'; +import { expDev, LocalDevOptions, setupDev } from '@lwrjs/api'; import { OrgUtils } from '../../../shared/orgUtils.js'; import { PromptUtils } from '../../../shared/promptUtils.js'; import { ExperienceSite } from '../../../shared/experience/expSite.js'; @@ -80,8 +80,8 @@ export default class LightningDevSite extends SfCommand { // Start the dev server const port = parseInt(process.env.PORT ?? '3000', 10); - const startupParams = { - sfCli: true, + const startupParams: LocalDevOptions = { + sfCLI: true, authToken, open: true, port,