diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f770f75..7f7244f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,10 +9,6 @@ jobs: env: CGO_ENABLED: 0 steps: - - name: Setup Dynamic Env - run: | - echo "MAKEFLAGS=-j$(nproc)" | tee $GITHUB_ENV - - name: Checkout code uses: actions/checkout@v2 @@ -21,67 +17,26 @@ jobs: with: nix_path: nixpkgs=channel:nixpkgs-unstable - - name: Multiline env set + - name: Install Nix Packages 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 + nix-shell --run true + ./direnv allow + ./direnv export gha >> "$GITHUB_ENV" - - name: Multiline env check + - name: Check Nix Packages without direnv run: | set -x - echo "$v" | wc -l - echo "$v_naive" - echo "$v_naive" | wc -l - echo "$v_escaped=" - echo "$v_escaped=" | wc -l + echo PYTHONPATH=$PYTHONPATH + which prettier - - name: Install Nix Packages + - name: Install Nix Packages & Export Using direnv 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 + nix-shell --run true + ./direnv allow + ./direnv export gha >> "$GITHUB_ENV" - 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 - - - name: Check Nix Packages + - name: Check Nix Packages with direnv 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 - - - name: Install Go tools - run: make tools - - - name: Linters and Go Formatting - run: make verify - - - name: Non Go Formatters - run: nix-shell --run ./.github/workflows/formatters.sh - - - name: Install ZFS - run: sudo apt-get -y update && sudo apt-get -y install zfsutils-linux - - - name: Tests - run: sudo make test + echo PYTHONPATH=$PYTHONPATH + which prettier diff --git a/direnv b/direnv new file mode 100755 index 0000000..cf2a04b Binary files /dev/null and b/direnv differ