Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing Github Actions #468

Merged
merged 2 commits into from
Dec 1, 2020

Conversation

martin-key
Copy link
Contributor

@martin-key martin-key commented Dec 1, 2020

Implementing Github Actions

Summary

As I needed the Github actions working for slather and coveralls I have used #459 as a base to start debugging and to find the problem. I have sent an email to coveralls support and they have answered that for github actions they are not using the coveralls repo secret, but they are using the GITHUB_TOKEN env secret from github actions. I have implemented that change and also I have added some more useful env variables for the report generation.

Result

As a result the reports are working correctly using slather with github actions and coveralls.
Screenshot 2020-12-01 at 15 15 08

References that I have used for the development:

Additional info

  • All the commits has been squashed
  • PR may be merged with Squash and merge for clean description and reference to the PR.

@martin-key martin-key mentioned this pull request Dec 1, 2020
@coveralls
Copy link

coveralls commented Dec 1, 2020

Coverage Status

Coverage decreased (-0.3%) to 95.527% when pulling aab480b on martin-key:add-github-actions into dc89ab0 on SlatherOrg:master.

@ksuther
Copy link
Contributor

ksuther commented Dec 1, 2020

Thanks for the PR! It'd be nice to get confirmation from someone else who has been waiting on this that everything works for them before I merge and make a release.

@brunohenriquesk1
Copy link

@ksuther I can confirm that everything works, our company is using Github actions and slather.

thanks @martin-key for implementing these changes!

@martin-key
Copy link
Contributor Author

@ksuther I will do a few minor amendments and will post here when it is ready for merging.

@martin-key
Copy link
Contributor Author

Ok, all the commits are correctly squashed and also I have improved the documentation so the correct branch appears in coveralls.

@ksuther
Copy link
Contributor

ksuther commented Dec 1, 2020

Great, merging it and making a release. Thanks to everyone who helped on this :)

@ksuther ksuther merged commit 9992bd5 into SlatherOrg:master Dec 1, 2020
@ksuther
Copy link
Contributor

ksuther commented Dec 1, 2020

One of the new tests failed in Travis. Not sure why it didn't show up in the PR though. Is this passing on your end?

https://travis-ci.org/github/SlatherOrg/slather/builds/747088844

  1) Slather::CoverageService::Coveralls#coveralls_coverage_data coverage_service is :github should return valid json for coveralls coverage data

     Failure/Error: expect(fixtures_project.send(:coveralls_coverage_data)).to be_json_eql("{\"service_job_id\":\"9182\",\"service_name\":\"github\",\"repo_token\":\"abc123\",\"service_pull_request\":\"1\",\"service_build_url\":\"https://github.com/Bruce/Wayne/actions/runs/1\",\"git\":{\"head\":{\"id\":\"ababa123\",\"author_name\":\"bwayne\",\"message\":\"hello\"},\"branch\":\"master\"}}").excluding("source_files")

     

       Expected equivalent JSON

       Diff:

       @@ -7,6 +7,7 @@

              "message": "hello"

            }

          },

       +  "repo_name": "",

          "repo_token": "abc123",

          "service_build_url": "https://github.com/Bruce/Wayne/actions/runs/1",

          "service_job_id": "9182",

       

     # ./spec/slather/coverage_service/coveralls_spec.rb:164:in `block (4 levels) in <top (required)>'

Finished in 52.27 seconds (files took 1.02 seconds to load)

180 examples, 1 failure

Failed examples:

rspec ./spec/slather/coverage_service/coveralls_spec.rb:158 # Slather::CoverageService::Coveralls#coveralls_coverage_data coverage_service is :github should return valid json for coveralls coverage data

@afinetooth
Copy link

LGTM from coveralls.

@senmu senmu mentioned this pull request Dec 3, 2020
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.

None yet

6 participants