Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add fish 3.6.1 job (based on alpine 3.18) #320

Merged
merged 2 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
{ fish: 3.3.1, alpine: 3.15 },
{ fish: 3.4.1, alpine: 3.16 },
{ fish: 3.5.1, alpine: 3.17 },
{ fish: 3.6.0, alpine: 'edge' },
{ fish: 3.6.1, alpine: 3.18 },
# { fish: 3.6.2, alpine: 'edge' },
]
steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 2 additions & 3 deletions functions/_pure_is_inside_container.fish
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ function _pure_is_inside_container \
--argument-names cgroup_namespace
set --query cgroup_namespace[1]; or set cgroup_namespace /proc/1/cgroup

set --local failure 1
if set --query pure_enable_container_detection; and test "$pure_enable_container_detection" = true
set --local success 0
if test -n "$container"
Expand All @@ -19,8 +20,6 @@ function _pure_is_inside_container \
return $success
end
end

set --local failure 1
return $failure
end
return $failure
end
6 changes: 6 additions & 0 deletions tests/_pure_is_inside_container.test.fish
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ cleanup_spy
_pure_is_inside_container
) $status -eq $SUCCESS

@test "_pure_is_inside_container: returns false as default behavior" (
set --universal pure_enable_container_detection false

_pure_is_inside_container
) $status -eq $FAILURE

cleanup_detection_methods
if test (uname -s) = Linux
@test "_pure_is_inside_container: detect with pid method" (
Expand Down
2 changes: 2 additions & 0 deletions tests/_pure_prompt_container.test.fish
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ end
if test "$USER" = nemo
before_each
@test "_pure_prompt_container: displays 'user@hostname' when inside container" (
set --universal pure_enable_container_detection true
string match --quiet --regex "$USER@[\w]+" (_pure_prompt_container)
) $status -eq $SUCCESS

before_each
@test "_pure_prompt_container: displays container prefix when inside container" (
set --universal pure_enable_container_detection true
set --universal pure_symbol_container_prefix "🐋"

string match --quiet --regex "🐋" (_pure_prompt_container)
Expand Down