-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.4 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
name: "Test Action"
on:
push:
branches:
- "**"
jobs:
test-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- name: Execute unit tests
run: npm run all
test-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- name: Package action for integration tests
if: "!startsWith(github.ref, 'refs/heads/release')"
run: npm run package
- id: default
uses: ./
- name: Test actor is greeted by default
uses: pr-mpt/actions-assert@v3
with:
assertion: npm://@assertions/is-equal:v1
expected: "Hello, ${{ github.actor }}!"
actual: "${{ steps.default.outputs.greeting }}"
- id: name
uses: ./
with:
name: "Alice T. Ester"
- name: Test name is greeted
uses: pr-mpt/actions-assert@v3
with:
assertion: npm://@assertions/is-equal:v1
expected: "Hello, Alice T. Ester!"
actual: "${{ steps.name.outputs.greeting }}"
- id: empty
uses: ./
with:
name: ""
- name: Test world is greeted when name is empty
uses: pr-mpt/actions-assert@v3
with:
assertion: npm://@assertions/is-equal:v1
expected: "Hello, World!"
actual: "${{ steps.empty.outputs.greeting }}"