Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 0 additions & 107 deletions .github/ISSUE_TEMPLATE/0-bug-report.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/ISSUE_TEMPLATE/1-feature-request.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Report a Bug
url: https://github.com/forcedotcom/code-analyzer/issues/new?template=2-vscode_extension_bug.yml
about: Create an issue in our main repository.
- name: Request a New Feature
url: https://github.com/forcedotcom/code-analyzer/issues/new?template=5-feature_request.yml
about: Request a feature in our main repository.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: build-scanner-tarball
name: build-tarball
on:
workflow_call:
inputs:
target-branch:
description: "Which branch of the scanner should be built?"
description: "Which branch of code analyzer should be built?"
required: false
type: string
default: "dev-4"
default: "dev"

jobs:
build-tarball:
Expand All @@ -22,11 +22,15 @@ jobs:
with:
distribution: 'temurin'
java-version: '11' # Always use Java v11 for building the tarball.
- name: 'Install Python'
uses: actions/setup-python@v5
with:
python-version: '3.10' # Minimum version required by code-analyzer.
- name: 'Check out, build, pack'
run: |
# Check out the target branch.
git clone -b ${{ inputs.target-branch }} https://github.com/forcedotcom/sfdx-scanner.git sfdx-scanner
cd sfdx-scanner
git clone -b ${{ inputs.target-branch }} https://github.com/forcedotcom/code-analyzer.git code-analyzer
cd code-analyzer
# Install and build dependencies.
if [[ "${{ inputs.target-branch}}" == "dev-4" ]]; then
yarn
Expand All @@ -40,5 +44,5 @@ jobs:
# Upload the tarball as an artifact so it's usable elsewhere.
- uses: actions/upload-artifact@v4
with:
name: scanner-tarball-${{ inputs.target-branch }}
name: tarball-${{ inputs.target-branch }}
path: ./**/salesforce-*.tgz
20 changes: 9 additions & 11 deletions .github/workflows/create-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ jobs:
if: ${{ needs.verify-should-run.outputs.should-run == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
permissions:
contents: write
outputs:
branch-name: ${{ steps.create-branch.outputs.branch_name }}
steps:
Expand Down Expand Up @@ -141,36 +139,36 @@ jobs:
git push -d origin ${NEW_VERSION}-interim
# Output the release branch name so we can use it in later jobs.
echo "branch_name=release-$NEW_VERSION" >> "$GITHUB_OUTPUT"
# Build the scanner tarballs so they can be installed locally when we run tests.
# Build the tarballs so they can be installed locally when we run tests.
build-v4-scanner-tarball:
name: 'Build v4 scanner tarball'
needs: verify-should-run
uses: ./.github/workflows/build-scanner-tarball.yml
uses: ./.github/workflows/build-tarball.yml
with:
# Note: Using `dev-4` here is technically incorrect. For full completeness's sake, we should probably be
# using the branch corresponding to the upcoming scanner release. However, identifying that branch is
# non-trivial, and there are unlikely to be major differences between the two that appear in the few days
# between creating the branch and releasing it, so it _should_ be fine.
target-branch: 'dev-4'
build-v5-scanner-tarball:
name: 'Build v5 scanner tarball'
build-v5-code-analyzer-tarball:
name: 'Build v5 code-analyzer tarball'
needs: verify-should-run
uses: ./.github/workflows/build-scanner-tarball.yml
uses: ./.github/workflows/build-tarball.yml
with:
# Note: Using `dev` here is technically incorrect. For full completeness's sake, we should probably be
# using the branch corresponding to the upcoming scanner release. However, identifying that branch is
# using the branch corresponding to the upcoming code-analyzer release. However, identifying that branch is
# non-trivial, and there are unlikely to be major differences between the two that appear in the few days
# between creating the branch and releasing it, so it _should_ be fine.
target-branch: 'dev'
# Run all the various tests against the newly created branch.
test-release-branch:
name: 'Run unit tests'
needs: [build-v4-scanner-tarball, build-v5-scanner-tarball, create-release-branch]
needs: [build-v4-scanner-tarball, build-v5-code-analyzer-tarball, create-release-branch]
uses: ./.github/workflows/run-tests.yml
with:
# We want to validate the extension against whatever version of the scanner we *plan* to publish,
# We want to validate the extension against whatever version of code analyzer we *plan* to publish,
# not what's *already* published.
use-scanner-tarballs: true
use-tarballs: true
v4-tarball-suffix: 'dev-4'
v5-tarball-suffix: 'dev'
target-branch: ${{ needs.create-release-branch.outputs.branch-name }}
22 changes: 10 additions & 12 deletions .github/workflows/daily-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,24 @@ on:
- cron: "30 17 * * 1-5"

jobs:
# Step 1: Build the scanner tarballs so they can be installed locally.
build-v4-scanner-tarball:
# Step 1: Build the tarballs so they can be installed locally.
build-v4-tarball:
name: 'Build v4 scanner tarball'
uses: ./.github/workflows/build-scanner-tarball.yml
uses: ./.github/workflows/build-tarball.yml
with:
target-branch: 'dev-4'
build-v5-scanner-tarball:
name: 'Build v5 scanner tarball'
uses: ./.github/workflows/build-scanner-tarball.yml
build-v5-tarball:
name: 'Build v5 code analyzer tarball'
uses: ./.github/workflows/build-tarball.yml
with:
target-branch: 'dev'
# Step 2: Actually run the tests.
smoke-test:
name: 'Run smoke tests'
needs: [build-v4-scanner-tarball, build-v5-scanner-tarball]
needs: [build-v4-tarball, build-v5-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-4` branch.
use-scanner-tarballs: true
use-tarballs: true
v4-tarball-suffix: 'dev-4'
v5-tarball-suffix: 'dev'
secrets: inherit
Expand All @@ -41,15 +39,15 @@ jobs:
report-problems:
name: 'Report problems'
runs-on: ubuntu-latest
needs: [build-v4-scanner-tarball, build-v5-scanner-tarball, smoke-test, create-vsix-artifact]
needs: [build-v4-tarball, build-v5-tarball, smoke-test, create-vsix-artifact]
if: ${{ failure() || cancelled() }}
steps:
- name: Report problems
shell: bash
env:
RUN_LINK: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
ALERT_SEV="critical"
ALERT_SEV="info"
ALERT_SUMMARY="Daily smoke test failed on ${{ runner.os }}"

generate_post_data() {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/production-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:

run: |

ALERT_SEV="critical"
ALERT_SEV="info"
ALERT_SUMMARY="Production heartbeat script failed on ${{ runner.os }}"
# Define a helper function to create our POST request's data, to sidestep issues with nested quotations.
generate_post_data() {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
# Set other miscellaneous environment variables as outputs for later.

run-tests:
name: 'Test against production scanner'
name: 'Test against production plugin'
needs: [ 'validate-release-environment' ]
uses: ./.github/workflows/run-tests.yml
with:
# Before publishing, we want to test the extension against whatever
# version of the scanner is currently live.
use-scanner-tarballs: false
# version of code analyzer is currently live.
use-tarballs: false

publish-vscode:
name: 'Publish to VSCode Marketplace'
Expand Down
Loading