Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mmlb committed Mar 22, 2022
1 parent a0276d8 commit 23864e6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 44 deletions.
59 changes: 15 additions & 44 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ jobs:
steps:
- name: Setup Dynamic Env
run: |
echo "MAKEFLAGS=-j$(nproc)" | tee $GITHUB_ENV
echo "MAKEFLAGS=-j$(nproc)" | tee -a "$GITHUB_ENV"
- name: Try escaped multiline var
run: |
echo "greeting=$'hello\nworld'" | tee -a "$GITHUB_ENV"
- name: Check escaped multiline var
run: |
echo "greeting=$greeting"
echo "greeting=$greeting" | wc -l
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -21,55 +30,17 @@ jobs:
with:
nix_path: nixpkgs=channel:nixpkgs-unstable

- name: Multiline env set
run: |
set -x
v=$(printf 'hello\nworld\n')
echo "$v" | wc -l
echo "v_naive=$v" >>$GITHUB_ENV
echo "v_escaped=${v//$'\n'/'%0A'}" >>$GITHUB_ENV
- name: Multiline env check
run: |
set -x
echo "$v" | wc -l
echo "$v_naive"
echo "$v_naive" | wc -l
echo "$v_escaped="
echo "$v_escaped=" | wc -l
- name: Install Nix Packages
run: |
set -x
echo PATHs pre
env -0 | while IFS='=' read -r -d '' n v; do
printf "%s\n" "$n"
done | sort | tee envs-pre
tr ':' '\n' <<<$PATH | sort | tee path-pre
tr ':' '\n' <<<$PYTHONPATH | sort | tee pythonpath-pre
nix-env -f shell.nix -i -A buildInputs
echo PATHs post
env -0 | while IFS='=' read -r -d '' n v; do
printf "%s\n" "$n"
done | sort | tee envs-post
tr ':' '\n' <<<$PATH | sort | tee path-post
tr ':' '\n' <<<$PYTHONPATH | sort | tee pythonpath-post
diff -u envs-pre envs-post
diff -u path-pre path-post
diff -u pythonpath-pre pythonpath-post
nix-shell --run true
./direnv allow
./direnv export gha >> "$GITHUB_ENV"
- name: Check Nix Packages
run: |
set -x
echo PATHs
env -0 | while IFS='=' read -r -d '' n v; do
printf "%s\n" "$n"
done | sort | tee envs-post
tr ':' '\n' <<<$PATH | sort
tr ':' '\n' <<<$PYTHONPATH | sort
echo PYTHONPATH=$PYTHONPATH
which prettier
- name: Install Go tools
run: make tools
Expand Down
Binary file added direnv
Binary file not shown.

0 comments on commit 23864e6

Please sign in to comment.