Skip to content

Commit

Permalink
try fixing direnv test
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Mar 15, 2024
1 parent 2006015 commit 66d9145
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ jobs:
run: |
mkdir -p ~/.config/nixpkgs
echo '{ allowAliases = false; }' > ~/.config/nixpkgs/config.nix
- run: |
nix build
./result/bin/devenv-run-tests --only ${{ matrix.example }} examples
- run: PATH=$PWD/result/bin:$PATH ./result/bin/devenv-run-tests --only ${{ matrix.example }} examples
direnv:
name: direnv (${{ join(matrix.os) }})
needs: build
Expand All @@ -91,23 +89,20 @@ jobs:
name: devenv
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
mv ./examples/simple/devenv.yaml ./examples/simple/devenv.yaml.orig
nix run nixpkgs#gawk -- '
{ print }
/^inputs:$/ {
print " devenv:";
print " url: path:../../?dir=src/modules";
}
' ./examples/simple/devenv.yaml.orig > ./examples/simple/devenv.yaml
nix profile remove '.*'
nix profile install . 'nixpkgs#direnv'
mkdir -p ~/.config/direnv/
cat > ~/.config/direnv/direnv.toml << 'EOF'
[global]
strict_env = true
EOF
direnv allow ./examples/simple
direnv exec ./examples/simple true
nix build
devenv_dir=$PWD
pushd examples/simple
$devenv_dir/result/bin/devenv inputs add devenv path:$devenv_dir?dir=src/module
direnv allow .
direnv exec . true
popd
fish-zsh:
name: zsh/fish (${{ join(matrix.os) }})
needs: build
Expand Down

0 comments on commit 66d9145

Please sign in to comment.