-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from forcedotcom/d/W-14093557
@W-14093557@: Better E2E, integration, and smoke tests
- Loading branch information
Showing
7 changed files
with
198 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: build-scanner-tarball | ||
on: | ||
workflow_call: | ||
inputs: | ||
target-branch: | ||
description: "Which branch of the scanner should be built?" | ||
required: false | ||
type: string | ||
default: "dev" | ||
|
||
jobs: | ||
build-tarball: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Install Node and Java. | ||
- name: 'Install Node LTS' | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 'lts/*' # Always use Node LTS for building the tarball. | ||
- name: 'Install Java 1.8' | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '8' # Always use Java v1.8 for building the tarball. | ||
- name: 'Check out, build, pack' | ||
run: | | ||
# Check out the target branch. | ||
git clone https://github.com/forcedotcom/sfdx-scanner.git sfdx-scanner | ||
cd sfdx-scanner | ||
git checkout ${{ inputs.target-branch }} | ||
# Install and build dependencies. | ||
yarn | ||
yarn build | ||
# Create the tarball. | ||
npm pack | ||
# Upload the tarball as an artifact so it's usable elsewhere. | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: scanner-tarball | ||
path: ./**/salesforce-sfdx-scanner-*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: daily-smoke-test | ||
on: | ||
workflow_dispatch: # As per documentation, the colon is needed even though no config is required. | ||
schedule: | ||
# Cron syntax is "minute[0-59] hour[0-23] date[1-31] month[1-12] day[0-6]". '*' is 'any value', and multiple values | ||
# can be specified with comma-separated lists. All times are UTC. | ||
# So this expression means "run at 13:30 UTC every day". This time was chosen because it corresponds to | ||
# 8:30AM CDT, meaning that any issues will be surfaced towards the start of business. | ||
- cron: "30 13 * * *" | ||
|
||
jobs: | ||
# Step 1: Build the scanner tarball so it can be installed locally. | ||
build-scanner-tarball: | ||
name: 'Build scanner tarball' | ||
uses: ./.github/workflows/build-scanner-tarball.yml | ||
with: | ||
target-branch: 'dev' | ||
# Step 2: Actually run the tests. | ||
smoke-test: | ||
name: 'Run smoke tests' | ||
needs: build-scanner-tarball | ||
uses: ./.github/workflows/run-tests.yml | ||
with: | ||
# For daily builds, we want to make sure we haven't pushed a breaking change | ||
# to the scanner's `dev` branch. | ||
use-scanner-tarball: true | ||
# Step 3: Build a VSIX artifact for use if needed. | ||
create-vsix-artifact: | ||
name: 'Upload VSIX as artifact' | ||
uses: ./.github/workflows/create-vsix-artifact.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters