-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (50 loc) · 1.25 KB
/
shell.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
name: l12n-shell tests
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create env dir
run: |
mkdir envs
sudo ln -s $(pwd)/l12n-shell /usr/local/bin/l12n-shell
cd envs
echo "L12N_VAR=myvar" > .env
- name: Build CLI
run: |
cd envs
L12N_BUILD=1 l12n-shell
- name: Command as argument
run: |
cd envs
result=$(l12n-shell echo hello)
[[ "$result" = "hello" ]]
- name: Command piped
run: |
cd envs
result=$(echo "echo world" | l12n-shell )
[[ "$result" = "world" ]]
- name: Check env
run: |
cd envs
result=$(echo 'echo $L12N_VAR' | l12n-shell )
[[ "$result" = "myvar" ]]
- name: Check l12n
run: |
l12n-shell l12n
- name: Recursive l12n-shell
run: |
cd envs
l12n-shell ../l12n-shell env | grep L12N_VAR=myvar