Skip to content

Commit

Permalink
Merge pull request #2943 from github/bump-aruba
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
mislav authored Mar 25, 2022
2 parents af71509 + 2e0ef29 commit e7576e0
Show file tree
Hide file tree
Showing 25 changed files with 157 additions and 201 deletions.
32 changes: 7 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,22 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ["1.11", "1.12", "1.13", "1.14"]
env:
BUNDLE_BIN: bin

steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: actions/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.x

- name: Cache gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Bundle install
run: |
bundle install --path vendor/bundle
bundle binstub cucumber --path bin
ruby-version: "2.6"
bundler-cache: true

- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

# - name: Install system packages
# if: runner.os == 'Linux'
# run: sudo apt-get install -y zsh fish
go-version: "1.18"

- name: Run tests
run: make test-all
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: "1.13"
go-version: "1.18"

- name: Publish release script
run: script/publish-release
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source 'https://rubygems.org'

gem 'aruba', '~> 1.0.0.pre.alpha.4'
gem 'aruba', '~> 1.0.4'
gem 'cucumber', '~> 3.1.2'
gem 'sinatra'
39 changes: 17 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
GEM
remote: https://rubygems.org/
specs:
aruba (1.0.0.pre.alpha.4)
childprocess (~> 1.0)
contracts (~> 0.13)
cucumber (>= 2.4, < 4.0)
ffi (~> 1.9)
aruba (1.0.4)
childprocess (>= 2.0, < 5.0)
contracts (~> 0.16.0)
cucumber (>= 2.4, < 6.0)
rspec-expectations (~> 3.4)
thor (~> 0.19)
backports (3.15.0)
builder (3.2.3)
childprocess (1.0.1)
rake (< 13.0)
contracts (0.16.0)
thor (~> 1.0)
backports (3.23.0)
builder (3.2.4)
childprocess (4.1.0)
contracts (0.16.1)
cucumber (3.1.2)
builder (>= 2.1.2)
cucumber-core (~> 3.2.0)
Expand All @@ -29,37 +27,34 @@ GEM
cucumber-expressions (6.0.1)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
diff-lcs (1.3)
ffi (1.11.1)
ffi (1.11.1-java)
diff-lcs (1.5.0)
gherkin (5.1.0)
multi_json (1.13.1)
multi_json (1.15.0)
multi_test (0.1.2)
mustermann (1.0.3)
rack (2.0.7)
rack-protection (2.0.5)
rack
rake (12.3.3)
rspec-expectations (3.8.4)
rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.2)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
sinatra (2.0.5)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.5)
tilt (~> 2.0)
thor (0.20.3)
thor (1.2.1)
tilt (2.0.9)

PLATFORMS
java
ruby

DEPENDENCIES
aruba (~> 1.0.0.pre.alpha.4)
aruba (~> 1.0.4)
cucumber (~> 3.1.2)
sinatra

BUNDLED WITH
1.17.1
1.17.2
8 changes: 4 additions & 4 deletions features/api.feature
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Feature: hub api
"""
Then the output should contain exactly:
"""
.query query {\n repository\n}\n
.query query {\\n repository\\n}\\n\n
"""

Scenario: POST body from file
Expand Down Expand Up @@ -340,7 +340,7 @@ Feature: hub api
"""
Then the output should contain exactly:
"""
.query repository(owner: "octocat", name: "Hello-World", nameWithOwner: "octocat/Hello-World")\n
.query repository(owner: "octocat", name: "Hello-World", nameWithOwner: "octocat/Hello-World")\\n\n
"""

Scenario: Cache response
Expand Down Expand Up @@ -508,7 +508,7 @@ Feature: hub api
"""
{}
Your access token may have insufficient scopes. Visit http://github.com/settings/tokens
to edit the 'hub' token and enable one of the following scopes: admin, repo
to edit the 'hub' token and enable one of the following scopes: admin, repo\n
"""

Scenario: Print the SSO challenge to stderr
Expand All @@ -526,5 +526,5 @@ Feature: hub api
"""
You must authorize your token to access this organization:
http://example.com?auth=HASH
http://example.com?auth=HASH\n
"""
1 change: 0 additions & 1 deletion features/apply.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Feature: hub apply
}
"""
When I successfully run `hub apply -3 https://github.com/mislav/dotfiles/pull/387`
Then the output should not contain anything
Then a file named "README.md" should exist

Scenario: Apply commits when TMPDIR is empty
Expand Down
17 changes: 4 additions & 13 deletions features/authentication.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@ Feature: OAuth authentication
Scenario: Ask for username & password, create authorization
Given the GitHub API server:
"""
require 'socket'
require 'etc'
machine_id = "#{Etc.getlogin}@#{Socket.gethostname}"
post('/authorizations') {
assert_basic_auth 'mislav', 'kitty'
assert :scopes => ['repo', 'gist'],
:note => "hub for #{machine_id}",
:note_url => 'https://hub.github.com/'
status 201
json :token => 'OTOKEN'
Expand Down Expand Up @@ -88,13 +83,9 @@ Feature: OAuth authentication
Scenario: Rename & retry creating authorization if there's a token name collision
Given the GitHub API server:
"""
require 'socket'
require 'etc'
machine_id = "#{Etc.getlogin}@#{Socket.gethostname}"
post('/authorizations') {
assert_basic_auth 'mislav', 'kitty'
if params[:note] == "hub for #{machine_id} 3"
if params[:note] =~ /\Ahub for .+ 3\Z/
status 201
json :token => 'OTOKEN'
else
Expand Down Expand Up @@ -504,9 +495,9 @@ Feature: OAuth authentication
Scenario: Config file is not writeable, should exit before asking for credentials
Given $HUB_CONFIG is "/InvalidConfigFile"
When I run `hub create` interactively
Then the output should contain exactly:
Then the output should contain:
"""
open /InvalidConfigFile: permission denied\n
open /InvalidConfigFile:
"""
And the exit status should be 1
And the file "../home/.config/hub" should not exist
Expand Down Expand Up @@ -536,5 +527,5 @@ Feature: OAuth authentication
"""
Error fetching releases: Forbidden (HTTP 403)
You must authorize your token to access this organization:
http://example.com?auth=HASH
http://example.com?auth=HASH\n
"""
4 changes: 2 additions & 2 deletions features/compare.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ Feature: hub compare
Scenario: No args, no upstream
When I run `hub compare`
Then the exit status should be 1
And the stderr should contain exactly "the current branch 'master' doesn't seem pushed to a remote"
And the stderr should contain exactly "the current branch 'master' doesn't seem pushed to a remote\n"

Scenario: Can't compare default branch to self
Given the default branch for "origin" is "develop"
And I am on the "develop" branch with upstream "origin/develop"
When I run `hub compare`
Then the exit status should be 1
And the stderr should contain exactly "the branch to compare 'develop' is the default branch"
And the stderr should contain exactly "the branch to compare 'develop' is the default branch\n"

Scenario: No args, has upstream branch
Given I am on the "feature" branch with upstream "origin/experimental"
Expand Down
2 changes: 1 addition & 1 deletion features/create.feature
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Feature: hub create

Scenario: Cannot create from bare repo
Given the current dir is not a repo
And I run `git init --bare`
And I run `git -c init.defaultBranch=main init --bare`
When I run `hub create`
Then the stderr should contain exactly "unable to determine git working directory\n"
And the exit status should be 1
Expand Down
6 changes: 3 additions & 3 deletions features/fork.feature
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ Feature: hub fork
}
"""
When I run `hub fork`
Then the exit status should be 128
And the stderr should contain exactly:
Then the exit status should not be 0
And the stderr should contain:
"""
fatal: remote mislav already exists.\n
remote mislav already exists.
"""
And the url for "mislav" should be "git@github.com:mislav/unrelated.git"

Expand Down
14 changes: 7 additions & 7 deletions features/gist.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Feature: hub gist
When I successfully run `hub gist show myhash`
Then the output should contain exactly:
"""
my content is here
my content is here\n
"""

Scenario: Fetch a gist with many files
Expand Down Expand Up @@ -70,7 +70,7 @@ Feature: hub gist
When I successfully run `hub gist show myhash hub_gist1.txt`
Then the output should contain exactly:
"""
my content is here
my content is here\n
"""

Scenario: Create a gist from file
Expand All @@ -88,7 +88,7 @@ Feature: hub gist
When I successfully run `hub gist create testfile.txt`
Then the output should contain exactly:
"""
http://gists.github.com/somehash
http://gists.github.com/somehash\n
"""

Scenario: Open the new gist in a browser
Expand Down Expand Up @@ -130,7 +130,7 @@ Feature: hub gist
When I successfully run `hub gist create testfile.txt testfile2.txt`
Then the output should contain exactly:
"""
http://gists.github.com/somehash
http://gists.github.com/somehash\n
"""

Scenario: Create a gist from stdin
Expand All @@ -149,7 +149,7 @@ Feature: hub gist
"""
Then the output should contain exactly:
"""
http://gists.github.com/somehash
http://gists.github.com/somehash\n
"""

Scenario: Insufficient OAuth scopes
Expand All @@ -172,7 +172,7 @@ Feature: hub gist
"""
Error creating gist: Not Found (HTTP 404)
Your access token may have insufficient scopes. Visit http://github.com/settings/tokens
to edit the 'hub' token and enable one of the following scopes: gist
to edit the 'hub' token and enable one of the following scopes: gist\n
"""

Scenario: Infer correct OAuth scopes for gist
Expand All @@ -194,7 +194,7 @@ Feature: hub gist
"""
Error creating gist: Not Found (HTTP 404)
Your access token may have insufficient scopes. Visit http://github.com/settings/tokens
to edit the 'hub' token and enable one of the following scopes: gist
to edit the 'hub' token and enable one of the following scopes: gist\n
"""

Scenario: Create error
Expand Down
1 change: 1 addition & 0 deletions features/pr-list.feature
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Feature: hub pr list
#102 luke, jyn\n
"""

@keep-ansi-escape-sequences
Scenario: List draft status
Given the GitHub API server:
"""
Expand Down
4 changes: 2 additions & 2 deletions features/pr-show.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Feature: hub pr show
Then "open https://github.com/ashemesh/hub/pull/102" should not be run
And the output should contain exactly:
"""
#102 rey, github/troopers, github/cantina-band\n
#102 rey, github/troopers, github/cantina-band\n\n
"""

Scenario: Current branch in fork
Expand Down Expand Up @@ -208,7 +208,7 @@ Feature: hub pr show
Then "open https://github.com/ashemesh/hub/pull/102" should not be run
And the output should contain exactly:
"""
#102 rey, github/troopers, github/cantina-band\n
#102 rey, github/troopers, github/cantina-band\n\n
"""

Scenario: Show pull request by invalid number
Expand Down
2 changes: 1 addition & 1 deletion features/pull_request.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ Feature: hub pull-request
And stderr should contain exactly:
"""
Error creating pull request: Post https://api.github.com/repositories/12345/pulls: refusing to follow HTTP 301 redirect for a POST request
Have your site admin use HTTP 308 for this kind of redirect
Have your site admin use HTTP 308 for this kind of redirect\n
"""

Scenario: Default message with --push
Expand Down
2 changes: 1 addition & 1 deletion features/release.feature
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ MARKDOWN
### Hello to my release
Here is what's broken:
- everything\n
- everything\n\n
"""

Scenario: Show release no tag
Expand Down
Loading

0 comments on commit e7576e0

Please sign in to comment.