Ensure `file` is relative to `GITHUB_WORKSPACE`. by reitermarkus · Pull Request #4 · Drieam/rspec-github · GitHub
Skip to content

Ensure file is relative to GITHUB_WORKSPACE.#4

Merged
StefSchenkelaars merged 4 commits into
Drieam:masterfrom
reitermarkus:github-workspace
Sep 10, 2020
Merged

Ensure file is relative to GITHUB_WORKSPACE.#4
StefSchenkelaars merged 4 commits into
Drieam:masterfrom
reitermarkus:github-workspace

Conversation

@reitermarkus

Copy link
Copy Markdown
Contributor

When running rspec in a subdirectory, no annotations are shown currently, since file has to be relative to the GITHUB_WORKSPACE.

@reitermarkus

Copy link
Copy Markdown
Contributor Author

@StefSchenkelaars StefSchenkelaars self-assigned this Sep 9, 2020

@StefSchenkelaars StefSchenkelaars left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reitermarkus Thanks for the mention, I indeed missed them. And thanks for the PR.

The main thing here are tests. Could you add some test cases validating that this works.

Comment thread lib/rspec/github/formatter.rb
@reitermarkus

Copy link
Copy Markdown
Contributor Author

Simplified the implementation and added some tests.

@StefSchenkelaars StefSchenkelaars left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @reitermarkus, thanks for the update, looks good!

So I was thinking on how to validate that this actually works. I've now added an e2e GitHub action to the ci workflow. It basically runs the bundle exec rspec spec/integration command. So if you now look in the files changed of this PR, you can see that it works for the case without these relative paths. (note that I merged master into your branch).

So if you feel like it, you can add an end 2 end test with a relative path to really ensure that it works but if not, you can merge it (it's approved).

@reitermarkus

Copy link
Copy Markdown
Contributor Author

you can merge it (it's approved)

I actually can't because I don't have rights on this repo.

@StefSchenkelaars StefSchenkelaars merged commit cbfb574 into Drieam:master Sep 10, 2020
@StefSchenkelaars

Copy link
Copy Markdown
Contributor

@reitermarkus reitermarkus deleted the github-workspace branch September 10, 2020 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants