fix: further debugging (#101) #157
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |