generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (51 loc) · 1.74 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
name: 'build-test'
on: # rebuild any PRs and main branch changes
workflow_dispatch:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
npm install
- run: |
npm run all
test: # make sure the action works without having to build
strategy:
matrix:
runs-on: [macos-latest, ubuntu-20.04, ubuntu-22.04, ubuntu-latest]
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout Locally
uses: actions/checkout@v3
if: ${{ env.ACT }}
with:
path: "1password-action"
- name: Checkout Github
uses: actions/checkout@v3
if: ${{ !env.ACT }}
- name: Test Action
uses: ./
id: secrets
with:
device-id: ${{ secrets.OP_DEVICE_ID }}
sign-in-address: ${{ secrets.OP_SIGN_IN_ADDRESS }}
email-address: ${{ secrets.OP_EMAIL_ADDRESS }}
secret-key: ${{ secrets.OP_SECRET_KEY }}
master-password: ${{ secrets.OP_MASTER_PASSWORD }}
items: |
1Password Action Tests > Test Login
1Password Action Tests > Test Password | p12
1Password Action Tests > Test Document
- name: Verify
run: |
[[ "${{ steps.secrets.outputs.test_login_username }}" == "username001" ]] || exit 1
[[ "${{ steps.secrets.outputs.test_login_password }}" == "password123" ]] || exit 1
[[ "${{ steps.secrets.outputs.p12 }}" == "password456" ]] || exit 1
[[ "${{ steps.secrets.outputs.test_document_filename }}" == "Test Document.txt" ]] || exit 1
[[ -f "Test Document.txt" ]] || exit 1