-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (59 loc) · 2.03 KB
/
integration-tests.yaml
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
# yamllint disable rule:line-length
# yamllint disable rule:truthy
---
name: integration tests
on:
workflow_call:
secrets:
OP_SERVICE_ACCOUNT_TOKEN:
description: 1password vault services account token
required: false
permissions:
contents: read
jobs:
integration-tests:
name: 1password-action integration tests
runs-on: ubuntu-latest
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
steps:
- name: checkout code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install 1Password CLI
uses: 1password/install-cli-action@143a85f84a90555d121cde2ff5872e393a47ab9f # v1.0.0
with:
version: 2.28.0
- name: write value using 1password-action/write-to-file
uses: ThoughtWorks-DPS/1password-action/write-to-file@main
with:
op-value: empc-lab/svc-gmail/username
out-file: write_test.txt
- name: test 1password-action/write-to-file results
shell: bash
run: |
set -exo pipefail
cat write_test.txt | grep "twdps"
- name: populate template with 1password-action/tpl using defaults
uses: ThoughtWorks-DPS/1password-action/tpl@main
with:
tpl-file: default_email.txt
before-tpl: echo "before tpl message"
after-tpl: echo "after tpl message"
- name: test 1password-action/tpl with defaults results
shell: bash
run: |
set -exo pipefail
cat default_email.txt | grep "twdps"
- name: populate template with 1password-action/tpl using overrides
uses: ThoughtWorks-DPS/1password-action/tpl@main
with:
tpl-path: test
tpl-file: email.txt
tpl-ext: template
out-path: .
out-file: named_email.txt
- name: test 1password-action/tpl using overrides results
shell: bash
run: |
set -exo pipefail
cat named_email.txt | grep "twdps"