-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (70 loc) · 2.45 KB
/
test.yml
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
74
75
name: Test
on:
workflow_dispatch:
push:
paths:
- "**/*.js"
- "action.yml"
- ".github/workflows/test.yml"
jobs:
setup_job:
runs-on: ubuntu-latest
container: orgflow/cli:2.x
name: Setup
outputs:
stack-name: ${{ steps.create_stack.outputs.stack-name }}
steps:
- id: create_stack
name: Create temporary stack
run: |
mkdir /tmp/$STACKNAME
git init --bare -b main /tmp/$STACKNAME
orgflow stack:create --name=$STACKNAME --gitRepoUrl=/tmp/$STACKNAME --username='${{ secrets.SALESFORCE_USERNAME }}' --password='${{ secrets.SALESFORCE_PASSWORD }}' --licenseKey=${{ secrets.ORGFLOW_LICENSEKEY }} --acceptEula
echo "stack-name=$STACKNAME" >> $GITHUB_OUTPUT
env:
STACKNAME: TestStack_${{ github.run_id }}_${{ github.run_number }}
test_job:
runs-on: ${{ matrix.image }}
name: Test action
needs: setup_job
strategy:
matrix:
image: [ubuntu-latest, macos-latest, windows-latest]
version: [1, 2]
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up OrgFlow
uses: ./
id: setup
with:
version: ${{ matrix.version }}
license-key: ${{ secrets.ORGFLOW_LICENSEKEY }}
salesforce-username: ${{ secrets.SALESFORCE_USERNAME }}
salesforce-password: ${{ secrets.SALESFORCE_PASSWORD }}
git-username: DimitriusWoodward # Bogus
git-password: tMfxyRCtnulUxXZl # Bogus
stack-name: ${{ needs.setup_job.outputs.stack-name }}
diag-artifact-name: orgflow_diag_${{ matrix.image }}_${{ github.run_attempt }}
env:
ORGFLOW__ACCEPTEULA: "true"
- name: Print outputs
run: |
echo "Version: ${{ steps.setup.outputs.version }}"
echo "Encryption key: ${{ steps.setup.outputs.encryption-key }}"
- name: Test persisted config
run: |
orgflow env:list
teardown_job:
runs-on: ubuntu-latest
container: orgflow/cli:2.x
name: Teardown
needs: [setup_job, test_job]
if: ${{ always() }}
steps:
- name: Delete temporary stack
run: |
orgflow stack:delete --name=$STACKNAME --licenseKey=${{ secrets.ORGFLOW_LICENSEKEY }} --acceptEula --noConfirm
env:
STACKNAME: ${{ needs.setup_job.outputs.stack-name }}