Skip to content

Commit

Permalink
🔧 making tests easier to run by relying on less environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
pysco68 committed Feb 29, 2024
1 parent 00e2c52 commit bf1c0d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
env:
GH_USER: nxxmgh
GH_PASS: ${{ secrets.USER_PAT_NXXMGH_TOKEN_FOR_GH }}
GH_RELEASE_TEST_REPO_OWNER: tipibuild
GH_RELEASE_TEST_REPO_NAME: test-gh-client-release
steps:
- name: checkout
uses: actions/checkout@v2
Expand Down
5 changes: 1 addition & 4 deletions test/gh-branches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ int main(int argc, char** argv) {
}, auth);

// a repo with branch protections
std::string repo_owner = std::getenv("GH_RELEASE_TEST_REPO_OWNER");
std::string repo_name = std::getenv("GH_RELEASE_TEST_REPO_NAME");

gh::list_branches(repo_owner, repo_name, [&](gh::repos::branches&& branches) {
gh::list_branches("tipibuild", "test-gh-client-release", [&](gh::repos::branches&& branches) {

auto findit = std::find_if(branches.begin(), branches.end(), [](gh::repos::branch_t& b) { return b.is_protected; });

Expand Down
4 changes: 2 additions & 2 deletions test/gh-releases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ int main(int argc, char** argv) {

// testing the release creation
{
std::string repo_owner = std::getenv("GH_RELEASE_TEST_REPO_OWNER");
std::string repo_name = std::getenv("GH_RELEASE_TEST_REPO_NAME");
std::string repo_owner = "tipibuild";
std::string repo_name = "test-gh-client-release";

std::stringstream release_tag_ss;
release_tag_ss << "test-" << std::time(0);
Expand Down

0 comments on commit bf1c0d5

Please sign in to comment.