Skip to content

Commit

Permalink
more test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Mar 17, 2024
1 parent e1c2d72 commit e0c2d3e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
10 changes: 1 addition & 9 deletions examples/phoenix/.test.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
#!/usr/bin/env bash
set -ex

mix local.hex --force
mix local.rebar --force
echo Y | mix archive.install hex phx_new
echo Y | mix phx.new hello
sed -i.bak -e "s/username: \"postgres\",/socket_dir: System.get_env(\"PGDATA\"),/" \
./hello/config/dev.exs && rm ./hello/config/dev.exs.bak

wait_for_port 4000
curl -s http://localhost:4000/ | grep "Phoenix Framework"
curl -s http://localhost:4000/ | grep "Phoenix Framework"
12 changes: 9 additions & 3 deletions examples/phoenix/devenv.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{ pkgs, lib, ... }:

{
# this example is currently broken

packages = lib.optionals pkgs.stdenv.isLinux [ pkgs.inotify-tools ];

languages.elixir.enable = true;

services.postgres.enable = true;

processes.phoenix.exec = "mix ecto.create && mix phx.server";
processes.phoenix.exec = "cd hello && mix deps.get && mix ecto.create && mix phx.server";
process.before = ''
mix local.hex --force
mix local.rebar --force
echo Y | mix archive.install hex phx_new
echo Y | mix phx.new hello
sed -i.bak -e "s/username: \"postgres\",/socket_dir: System.get_env(\"PGDATA\"),/" \
./hello/config/dev.exs && rm ./hello/config/dev.exs.bak
'';
}
2 changes: 2 additions & 0 deletions examples/supported-languages/.setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# arm is not supported yet
echo "{ pkgs, ... }: { languages.unison.enable = !(stdenv.isLinux && stdenv.isAarch64); }" > devenv.local.nix
2 changes: 1 addition & 1 deletion examples/vala/devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
packages = with pkgs; [
# Check Vala code files for code-style errors
vala-lint
# vala-lint
];

languages = {
Expand Down
2 changes: 1 addition & 1 deletion tests/glibcLocales/devenv.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
enterTest = ''
locale -a | grep "en_US.UTF-8"
locale -a | grep -E '(en_US.UTF-8|en_US.utf8)'
'';
}

0 comments on commit e0c2d3e

Please sign in to comment.