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
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'dont deploy') && github.event.pull_request.merged == true }}
steps:
- uses: 8BitJonny/[email protected]
id: PR
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Auth File
run: scripts/bash/create-sfdx-auth-file.sh
- name: Get Deployment
id: get_deployment
run: scripts/bash/get-deployment.sh
run: |
echo '{"sfdxAuthUrl": "${{ secrets.SF_AUTH_URL }}"}' > authFile.json
- uses: ZackFra/sf-delta-deploy@master
with:
branch: origin/main
quick-deploy-id: ${{ steps.get_deployment.outputs.quick-deploy-id }}
quick-deploy-id: ${{ steps.PR.outputs.pr_body }}
26 changes: 12 additions & 14 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ on:
paths:
- "**/main/default/**"

env:
AWS_SECRET: ${{ secrets.AWS_SECRET }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_SAVE_DEPLOYMENT_FUNC: ${{ secrets.AWS_SAVE_DEPLOYMENT_FUNC }}
AWS_GET_DEPLOYMENT_FUNC: ${{ secrets.AWS_GET_DEPLOYMENT_FUNC }}
SF_AUTH_URL: ${{ secrets.SF_AUTH_URL }}
REPOSITORY: ${{ github.repository }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}

jobs:
validate-pull-request:
permissions: write-all
Expand All @@ -51,11 +41,19 @@ jobs:
with:
fetch-depth: 0
- name: Create Auth File
run: scripts/bash/create-sfdx-auth-file.sh
run: |
echo '{"sfdxAuthUrl": "${{ secrets.SF_AUTH_URL }}"}' > authFile.json
- uses: ZackFra/sf-delta-validate@master
with:
branch: origin/main
auth-file: authFile.json
- name: Save To Database
run: scripts/bash/save-deployment.sh
- name: Get Job Id
run: |
node scripts/js/get-job-id.js
- name: Update PR Description
uses: nefrob/[email protected]
with:
content: job-id.txt
contentIsFilePath: true
regex: ".*"
token: ${{ secrets.GITHUB_TOKEN }}

1 change: 0 additions & 1 deletion authFile.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3900,11 +3900,11 @@ private class MockDatabaseTest {
@isTest
static void ensureNextQuarterInWhereClause() {
List<Opportunity> oppList = new List<Opportunity>();
Date today = Gmt.today();
Date startOfYear = Date.newInstance(Gmt.today().year(), 1, 1);
for(Integer i = 0; i < 12; i++) {
oppList.add(new Opportunity(
Name = 'Opp' + i,
CloseDate = today.addMonths(i)
CloseDate = startOfYear.addMonths(i)
));
}

Expand All @@ -3917,25 +3917,4 @@ private class MockDatabaseTest {

Assert.areEqual(3, opportunities.size(), 'Incorrect number of opportunities');
}

@isTest
static void ensureNextNQuartersWorksInWhereClause() {

List<Opportunity> oppList = new List<Opportunity>();
Date today = Gmt.today();
for(Integer i = 0; i < 12; i++) {
oppList.add(new Opportunity(
Name = 'Opp' + i,
CloseDate = today.addMonths(i)
));
}

MockDatabase.doInsert(oppList, true);

Test.startTest();
List<Opportunity> opportunities = MockDatabase.query('SELECT Id FROM Opportunity WHERE CloseDate = NEXT_N_QUARTERS:2');
Test.stopTest();

Assert.areEqual(6, opportunities.size(), 'Incorrect number of opportunities');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public with sharing class DateLiteralComparableFactory {
Token.N_MONTHS_AGO_LITERAL => NMonthsAgoComparable.class,
Token.THIS_QUARTER_LITERAL => ThisQuarterComparable.class,
Token.LAST_QUARTER_LITERAL => LastQuarterComparable.class,
Token.NEXT_QUARTER_LITERAL => NextQuarterComparable.class,
Token.NEXT_N_QUARTERS_LITERAL => NextNQuartersComparable.class
Token.NEXT_QUARTER_LITERAL => NextQuarterComparable.class
};

@TestVisible
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -418,17 +418,4 @@ private class ParserTest {
}
Test.stopTest();
}

@isTest
static void ensureParserCanParseNextNQuarters() {
Parser p = new Parser();
String soqlQuery = 'SELECT Id FROM Opportunity WHERE CreatedDate = NEXT_N_QUARTERS:5';
Test.startTest();
try {
p.parse(soqlQuery);
} catch(Exception e) {
Assert.fail('Expected no exception but got ' + e.getMessage() + ' for ' + soqlQuery);
}
Test.stopTest();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public with sharing class PrimitiveParserFactory {
Token.THIS_QUARTER_LITERAL => ThisQuarterParser.class,
Token.LAST_QUARTER_LITERAL => LastQuarterParser.class,
Token.NEXT_QUARTER_LITERAL => NextQuarterParser.class,
Token.NEXT_N_QUARTERS_LITERAL => NextNQuartersParser.class,
Token.XTRUE => BooleanParser.class,
Token.XFALSE => BooleanParser.class,
Token.XNULL => NullParser.class,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,4 @@ public inherited sharing class Token {
public final static String THIS_QUARTER_LITERAL = 'this_quarter';
public final static String LAST_QUARTER_LITERAL = 'last_quarter';
public final static String NEXT_QUARTER_LITERAL = 'next_quarter';
public final static String NEXT_N_QUARTERS_LITERAL = 'next_n_quarters';
}
6 changes: 0 additions & 6 deletions scripts/bash/config-aws.sh

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/bash/create-sfdx-auth-file.sh

This file was deleted.

6 changes: 0 additions & 6 deletions scripts/bash/get-deployment.sh

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/bash/invoke-lambda-func.sh

This file was deleted.

4 changes: 0 additions & 4 deletions scripts/bash/save-deployment.sh

This file was deleted.

Loading
Loading