-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (105 loc) · 2.48 KB
/
test.yml
File metadata and controls
118 lines (105 loc) · 2.48 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: "Test"
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
action:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Write single line
uses: ./
with:
path: test.log
contents: hello world
- name: Test single line
run: |
contents=`cat test.log`
echo "$contents"
if [ x"$contents" != x"hello world" ]; then
exit 1
fi
- name: Write multiline
uses: ./
with:
path: test.log
contents: |
hello
world
- name: Test multi line
run: |
contents=`cat test.log`
test=`echo -e hello\\\nworld\\\n`
echo "$contents"
if [ x"$contents" != x"$test" ]; then
exit 1
fi
- name: Write environment
uses: ./
env:
hello: hello
world: world
with:
path: test.log
contents: $hello $world
- name: Test environment
run: |
contents=`cat test.log`
echo "$contents"
if [ x"$contents" != x"hello world" ]; then
exit 1
fi
- name: Make test directory
run: |
mkdir test
- name: Write single line working directory
uses: ./
with:
working-directory: test
path: test.log
contents: hello world
- name: Test single line working directory
run: |
contents=`cat test/test.log`
echo "$contents"
if [ x"$contents" != x"hello world" ]; then
exit 1
fi
- name: Write multiline working directory
uses: ./
with:
working-directory: test
path: test.log
contents: |
hello
world
- name: Test multi line working directory
run: |
contents=`cat test/test.log`
test=`echo -e hello\\\nworld\\\n`
echo "$contents"
if [ x"$contents" != x"$test" ]; then
exit 1
fi
- name: Write environment working directory
uses: ./
env:
hello: hello
world: world
with:
working-directory: test
path: test.log
contents: $hello $world
- name: Test environment working directory
run: |
contents=`cat test/test.log`
echo "$contents"
if [ x"$contents" != x"hello world" ]; then
exit 1
fi