-
Notifications
You must be signed in to change notification settings - Fork 9
73 lines (61 loc) · 2.01 KB
/
ci.yml
File metadata and controls
73 lines (61 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Run CI
on:
push:
branches: [ main, 'feat/**' ]
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
pull_request:
branches: [ main, 'feat/**' ]
paths-ignore:
- '**.md'
jobs:
build-apex:
runs-on: ubuntu-latest
permissions:
id-token: write # Needed if using OIDC to get release secrets.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install Salesforce CLI (sfdx)
run: npm install @salesforce/cli --global
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0
name: 'Get secrets from AWS SSM'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '
/production/common/releasing/apex/username = DEFAULT_USERNAME,
/production/common/releasing/apex/consumer_key = SFDX_CONSUMER_KEY,
/production/common/releasing/apex/server.key = SERVER_KEY'
- name: Create server.key
run: echo -n "$SERVER_KEY" > server.key
- name: Authorize scratch organization
run: |
sf org login jwt \
--username $DEFAULT_USERNAME \
--client-id $SFDX_CONSUMER_KEY \
--jwt-key-file server.key \
--set-default \
--alias target
- name: Create scratch organization
run: |
sf org create scratch \
--definition-file ./config/project-scratch-def.json \
--alias github \
--set-default \
--target-dev-hub target
- name: Deploy SDK
run: sf project deploy start --source-dir force-app
- name: Trigger unit tests
run: sf apex run test --synchronous --test-level=RunAllTestsInOrg
build-bridge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go v1.15
uses: actions/setup-go@v5
with:
go-version: "1.15"
- name: Build
run: |
cd bridge
go build .