Skip to content
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

Migration from eschweitzer78 to SalesforceLabs #1

Merged
merged 2 commits into from
Oct 10, 2023
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@
**/aura/**/*.tokens
**/aura/**/*.xml
**/aura/**/*.app
**/aura/**/*.map
**/aura/**/*.scss
.sfdx
4 changes: 4 additions & 0 deletions .forceignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ package.xml
**/__tests__/**
**/test/**

# File gen files
.osfilegen.json
.cssgen.json

# documentation, etc
**/docs

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
uses: pozil/auto-assign-issue@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
assignees: ${{ secrets.DEFAULT_ISSUE_ASSIGNEE }}
assignees: ${{ vars.DEFAULT_ISSUE_ASSIGNEE }}
43 changes: 27 additions & 16 deletions .github/workflows/ci-pr-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ jobs:
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci

# Prep
- name: "Prepare repo"
run: npm run prep

# Run PMD scan
- name: "Run PMD scan for sfGpsDs"
uses: pmd/pmd-github-action@v1.3.0
uses: pmd/pmd-github-action@v1.4.1
id: pmd-sf-gps-ds
with:
sourcePath: "sfGpsDs"
Expand All @@ -103,7 +107,7 @@ jobs:

# Run PMD scan
- name: "Run PMD scan for sfGpsDsAuNsw"
uses: pmd/pmd-github-action@v1.3.0
uses: pmd/pmd-github-action@v1.4.1
id: pmd-sf-gps-ds-au-nsw
with:
sourcePath: "sfGpsDsAuNsw"
Expand All @@ -116,7 +120,7 @@ jobs:

# Run PMD scan
- name: "Run PMD scan for sfGpsDsAuNswS"
uses: pmd/pmd-github-action@v1.3.0
uses: pmd/pmd-github-action@v1.4.1
id: pmd-sf-gps-ds-au-nsw-s
with:
sourcePath: "sfGpsDsAuNswS"
Expand All @@ -129,7 +133,7 @@ jobs:

# Run PMD scan
- name: "Run PMD scan for sfGpsDsAuVic"
uses: pmd/pmd-github-action@v1.3.0
uses: pmd/pmd-github-action@v1.4.1
id: pmd-sf-gps-ds-au-vic
with:
sourcePath: "sfGpsDsAuVic"
Expand All @@ -142,7 +146,7 @@ jobs:

# Run PMD scan
- name: "Run PMD scan for sfGpsDsUkGov"
uses: pmd/pmd-github-action@v1.3.0
uses: pmd/pmd-github-action@v1.4.1
id: pmd-sf-gps-ds-uk-gov
with:
sourcePath: "sfGpsDsUkGov"
Expand All @@ -154,13 +158,16 @@ jobs:
run: exit 1

# Install Salesforce CLI
- name: "Install Salesforce CLI"
- name: "Install Salesforce CLI v7.182.1"
run: |
wget https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz
mkdir ~/sfdx
tar xJf sfdx-linux-x64.tar.xz -C ~/sfdx --strip-components 1
echo "$HOME/sfdx/bin" >> $GITHUB_PATH
~/sfdx/bin/sfdx version
npm install [email protected] --location=global
nodeInstallPath=$(npm config get prefix)
echo "$nodeInstallPath/bin" >> $GITHUB_PATH

# Install Salesforce CLI
- name: "Confirm Salesforce CLI version"
run: |
sfdx --version

# Store secret for dev hub
- name: "Populate auth file with DEVHUB_SFDX_URL secret"
Expand All @@ -183,7 +190,7 @@ jobs:

# Deploy omnistudio to scratch org
- name: "Deploy Omnistudio"
run: sfdx force:package:install -p ${{ secrets.OMNISTUDIO_PACKAGEID }} -u scratch-org -w 13 -r -s=AllUsers
run: sfdx force:package:install -p ${{ vars.OMNISTUDIO_PACKAGEID }} -u scratch-org -w 20 -r -s=AllUsers

# Activate metadata for omnistudio on scratch org
# (removed as OmniStudio metadata cannot be packaged fo now)
Expand All @@ -194,9 +201,13 @@ jobs:
# cd ../..
# node ./configure-omnistudio-metadata scratch-org

# Generate css from scss
- name: "Automatically generate css"
run: npm run cssgen

# Generate omnistudio versions of source
- name: "Automatically generate Omnistudio source"
run: node ./osfilegen.js
run: npm run osfilegen

# Deploy source to scratch org
- name: "Push source to scratch org"
Expand All @@ -215,8 +226,8 @@ jobs:
run: sfdx force:apex:test:run -c -r human -d ./tests/apex -w 20 --testlevel RunLocalTests

# Delete temporary test file that Codecov is unable to parse
- name: "Delete coverage file (temporary step)"
run: rm ./tests/apex/test-result-707*-codecoverage.json
#- name: "Delete coverage file (temporary step)"
# run: rm ./tests/apex/test-result-707*-codecoverage.json

# Upload code coverage data
- name: "Upload code coverage for Apex to Codecov.io"
Expand Down Expand Up @@ -279,7 +290,7 @@ jobs:
echo "hasChangesSfGpsDsUkGov=$hasChangesSfGpsDsUkGov" >> $GITHUB_OUTPUT
# Trigger packaging workflow if needed
- name: "Trigger packaging workflow if needed"
uses: peter-evans/repository-dispatch@v1.1.0
uses: peter-evans/repository-dispatch@v2
if: ${{ steps.checkForChanges.outputs.hasChanges == 'true' }}
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }}
Expand Down
45 changes: 28 additions & 17 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,26 @@ jobs:
# Cache node_modules to speed up the process
- name: "Restore node_modules cache"
id: cache-npm
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: node_modules
key: npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-${{ env.cache-name }}-
npm-

# Prep
- name: "Prepare repo"
run: npm run prep

# Install npm dependencies for Prettier and Jest
- name: "Install npm dependencies"
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci

# Run PMD scan
- name: "Run PMD scan for sfGpsDs"
uses: pmd/pmd-github-action@v1.3.0
uses: pmd/pmd-github-action@v1.4.1
id: pmd-sf-gps-ds
with:
sourcePath: "sfGpsDs"
Expand All @@ -113,7 +117,7 @@ jobs:

# Run PMD scan
- name: "Run PMD scan for sfGpsDsAuNsw"
uses: pmd/pmd-github-action@v1.3.0
uses: pmd/pmd-github-action@v1.4.1
id: pmd-sf-gps-ds-au-nsw
with:
sourcePath: "sfGpsDsAuNsw"
Expand All @@ -126,7 +130,7 @@ jobs:

# Run PMD scan
- name: "Run PMD scan for sfGpsDsAuNswS"
uses: pmd/pmd-github-action@v1.3.0
uses: pmd/pmd-github-action@v1.4.1
id: pmd-sf-gps-ds-au-nsw-s
with:
sourcePath: "sfGpsDsAuNswS"
Expand All @@ -139,7 +143,7 @@ jobs:

# Run PMD scan
- name: "Run PMD scan for sfGpsDsAuVic"
uses: pmd/pmd-github-action@v1.3.0
uses: pmd/pmd-github-action@v1.4.1
id: pmd-sf-gps-ds-au-vic
with:
sourcePath: "sfGpsDsAuVic"
Expand All @@ -152,7 +156,7 @@ jobs:

# Run PMD scan
- name: "Run PMD scan for sfGpsDsUkGov"
uses: pmd/pmd-github-action@v1.3.0
uses: pmd/pmd-github-action@v1.4.1
id: pmd-sf-gps-ds-uk-gov
with:
sourcePath: "sfGpsDsUkGov"
Expand All @@ -164,13 +168,16 @@ jobs:
run: exit 1

# Install Salesforce CLI
- name: "Install Salesforce CLI"
- name: "Install Salesforce CLI v7.182.1"
run: |
npm install [email protected] --location=global
nodeInstallPath=$(npm config get prefix)
echo "$nodeInstallPath/bin" >> $GITHUB_PATH

# Install Salesforce CLI
- name: "Confirm Salesforce CLI version"
run: |
wget https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz
mkdir ~/sfdx
tar xJf sfdx-linux-x64.tar.xz -C ~/sfdx --strip-components 1
echo "$HOME/sfdx/bin" >> $GITHUB_PATH
~/sfdx/bin/sfdx version
sfdx --version

# Store secret for dev hub
- name: "Populate auth file with DEVHUB_SFDX_URL secret"
Expand All @@ -193,7 +200,7 @@ jobs:

# Deploy omnistudio to scratch org
- name: "Deploy Omnistudio"
run: sfdx force:package:install -p ${{ secrets.OMNISTUDIO_PACKAGEID }} -u scratch-org -w 13 -r -s=AllUsers
run: sfdx force:package:install -p ${{ vars.OMNISTUDIO_PACKAGEID }} -u scratch-org -w 20 -r -s=AllUsers

# Activate metadata for omnistudio on scratch org
# (removed as OmniStudio metadata cannot be packaged fo now)
Expand All @@ -204,9 +211,13 @@ jobs:
# cd ../..
# node ./configure-omnistudio-metadata scratch-org

# Generate css from scss
- name: "Automatically generate css"
run: npm run cssgen

# Generate omnistudio versions of source
- name: "Automatically generate Omnistudio source"
run: node ./osfilegen.js
run: npm run osfilegen

# Deploy source to scratch org
- name: "Push source to scratch org"
Expand All @@ -225,8 +236,8 @@ jobs:
run: sfdx force:apex:test:run -c -r human -d ./tests/apex -w 20 --testlevel RunLocalTests

# Delete temporary test file that Codecov is unable to parse
- name: "Delete coverage file (temporary step)"
run: rm ./tests/apex/test-result-707*-codecoverage.json
#- name: "Delete coverage file (temporary step)"
# run: rm ./tests/apex/test-result-707*-codecoverage.json

# Upload code coverage data
- name: "Upload code coverage for Apex to Codecov.io"
Expand Down Expand Up @@ -290,7 +301,7 @@ jobs:

# Trigger packaging workflow if needed
- name: "Trigger packaging workflow if needed"
uses: peter-evans/repository-dispatch@v1.1.0
uses: peter-evans/repository-dispatch@v2
if: ${{ steps.checkForChanges.outputs.hasChanges == 'true' }}
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }}
Expand Down
Loading
Loading