-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@W-14093557@: Better E2E, integration, and smoke tests #14
Conversation
05bcb94
to
d814ad8
Compare
default: "dev" | ||
|
||
jobs: | ||
build-tarball: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This job is basically identical to the scanner repo's build-dependencies
job.
shell: bash | ||
run: | | ||
# Determine the tarball's name. | ||
TARBALL_NAME=$(ls ~/downloads/tarball/sfdx-scanner | grep salesforce-sfdx-scanner-[0-9]*\\.[0-9]*\\.[0-9]*\\.tgz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only key difference between this step and the equivalent step in sfdx-scanner is that we look for the tarball in ~/downloads/tarball/sfdx-scanner
instead of ~/downloads/tarball
. This extra folder is added as a consequence of having to clone the repo via git clone
instead of just using the actions/checkout@v3
command.
DOWNLOAD_PATH=`[[ $DOWNLOAD_PATH = C* ]] && echo $DOWNLOAD_PATH | cut -d':' -f 2 || echo $DOWNLOAD_PATH` | ||
echo $DOWNLOAD_PATH | ||
# Pipe in a `y` to simulate agreeing to install an unsigned package. Use a URI of the file's full path. | ||
echo y | sfdx plugins:install "file://${DOWNLOAD_PATH}/sfdx-scanner/${TARBALL_NAME}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, we add sfdx-scanner
to the path instead of just using the download path and tarball name, because of nuances related to git clone
.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smoke tests use the local tarball.
with: | ||
# We want to validate the extension against whatever version of the scanner we | ||
# *plan* to publish, not what's *already* published. | ||
use-scanner-tarball: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR validation uses the locally built tarball.
This PR does the following:
build-scanner-tarball.yml
) that can clonesfdx-scanner
, check out a specified branch, build a tarball from that branch, and upload it as an artifact.run-tests.yml
workflow so it can install either the production version ofsfdx-scanner
or a tarball generated by a preceding invocation ofbuild-scanner-tarball
.daily-smoke-test.yml
) that runs the unit tests every day at 13:30 UTC (i.e., 8:30AM CDT). This workflow uses a locally-built scanner tarball.validate-pr.yml
is now set to use the locally-built tarball for tests.publishVSCode.yml
has been changed to run the tests against the production scanner before publishing can proceed. This prevents us from accidentally publishing something incompatible with the currently-live version of the scanner.