Skip to content

Commit

Permalink
Try CUCUMBER_GITHUB_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
aisrael committed May 7, 2024
1 parent 8d7f3cb commit 1a9af57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions features/repos.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Feature: Repository management features

Scenario: Fetch repository details as JSON

Given a valid GITHUB_TOKEN is set
When I run `ghctl repo get gitsudo-io/ghctl`
Then the output should contain:
"""
Expand Down
8 changes: 8 additions & 0 deletions features/step_definitions/environment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file is used to set up the environment for the tests.

# Set the GITHUB_TOKEN from the environment variable CUCUMBER_GITHUB_TOKEN
# This is necessary to run the tests in GitHub Actions which does _not_ allow
# environments variables starting with `GITHUB_`.
Given /a valid GITHUB_TOKEN is set/ do
ENV['GITHUB_TOKEN'] = ENV['CUCUMBER_GITHUB_TOKEN'] unless ENV['GITHUB_TOKEN']
end

0 comments on commit 1a9af57

Please sign in to comment.