mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 05:17:11 -07:00
Add GitHub workflows for test and release
Also: - Fix test scenario that failed due to fuzzy completions - Bump Cucumber Fixes #36
This commit is contained in:
parent
04ecbe7361
commit
244456c681
9 changed files with 205 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
|||
FROM ruby:2.5.8-slim-buster
|
||||
FROM ruby:2.7-slim-buster
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update \
|
||||
|
@ -7,6 +7,8 @@ RUN apt-get update \
|
|||
curl \
|
||||
unzip \
|
||||
zip \
|
||||
ruby-dev \
|
||||
build-essential \
|
||||
&& apt-get clean
|
||||
|
||||
WORKDIR app
|
||||
|
@ -38,4 +40,4 @@ RUN ls -R $TEST_HOME/.config/fish/
|
|||
# Run tests
|
||||
COPY test ./
|
||||
ENTRYPOINT ["cucumber"]
|
||||
CMD []
|
||||
CMD ["--publish-quiet"]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
group :test do
|
||||
gem 'cucumber', '~> 3.1.0'
|
||||
gem 'rspec', '~> 3.7.0'
|
||||
gem 'cucumber', '~> 5'
|
||||
gem 'rspec', '~> 3'
|
||||
end
|
||||
|
|
|
@ -149,7 +149,7 @@ Feature: Shell Completion
|
|||
| ini | init | /^(?!init).*$/ |
|
||||
| ins | install | /^(?!install).*$/ |
|
||||
| c | clear | /^(?!clear).*$/ |
|
||||
| a | | /.*/ |
|
||||
| b | | /.*/ |
|
||||
| 'init ' | | /.*/ |
|
||||
| 'clear ' | | /.*/ |
|
||||
| 'install ' | | /.*/ |
|
||||
|
|
|
@ -34,14 +34,14 @@ def _uninstall_candidate_version(candidate_dir)
|
|||
end
|
||||
|
||||
When(/^candidate (\w+) is uninstalled$/) do |candidate|
|
||||
puts `ls ~/.sdkman/candidates/#{candidate}`
|
||||
log `ls ~/.sdkman/candidates/#{candidate}`
|
||||
Dir["#{ENV['HOME']}/.sdkman/candidates/#{candidate}/*"].each do |candidate_dir|
|
||||
_uninstall_candidate_version(candidate_dir)
|
||||
end
|
||||
puts `ls ~/.sdkman/candidates/#{candidate}`
|
||||
log `ls ~/.sdkman/candidates/#{candidate}`
|
||||
end
|
||||
|
||||
Given(/^file ([a-zA-Z0-9-_.\/]+) exists with content/) do |filename,content|
|
||||
Given(/^file ([a-zA-Z0-9\-_.\/]+) exists with content/) do |filename,content|
|
||||
FileUtils.mkdir_p(File.dirname(filename))
|
||||
File.write(filename, content)
|
||||
end
|
||||
|
|
|
@ -6,6 +6,7 @@ ParameterType(
|
|||
type: Array,
|
||||
transformer: lambda do |*patterns|
|
||||
patterns \
|
||||
.select { |s| !s.nil? } # Huh? Well, if it helps...
|
||||
.map(&:strip) \
|
||||
.map do |s|
|
||||
s = if %r{^/(.*)/$} =~ s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue