How to end the rails started process to generate simplecov coverage report

オープン
#508 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cypress, github-actions, rails, ruby
領域
ci-cd, testing

調査の方向性

リンク先の start-server ドキュメントと、workflow の start および wait-on 設定から始めてください。Cypress の完了後に action が Rails プロセスをどのように停止するか、また、upload 前に coverage レポートを生成できるほどプロセスが正常に終了するかを調査してください。workflow の最後に SimpleCov レポートが利用可能になっていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

type: enhancement

I'm using Cypress to do system on our Rails application and simplecov to generate the coverage report, but simplecov only generate the reports when the rails server process is terminated with sucess exit(0).

https://github.com/cypress-io/github-action#start-server

...

- name: Cypress Run
  uses: cypress-io/github-action@v2
  env:
    CYPRESS_RAILS_PORT: 9999
    CYPRESS_BASE_URL: "http://localhost:9999/"
    COVERAGE: true
  with:
    start: bundle exec rails server -b 0.0.0.0 -p 9999
    wait-on: "http://localhost:9999"

...

Cypress suite test runs perfectly but in the end I didn't get the simplecov reports to be uploaded to codecov. I'm guessing this is because the "started" rails process was note terminated by the cypress github action.

e.g

^C- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2022-02-18 11:48:09 -0300 ===
- Goodbye!
Exiting
Coverage report generated to /Users/wagner/src/tia/coverage/coverage.xml. 1469 / 3460 LOC (42.46%) covered
Coverage report generated to /Users/wagner/src/tia/coverage. 1469 / 3460 LOC (42.46%) covered.

Any idea how to achieve this ? Get the simplecov report in the end of the cypress github action execution?

Thanks a lot in advance.

主要言語
JavaScript
スター
1.5k
フォーク
356
平均マージ
1日 18時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cypress-io/github-action のほかの issue

cypress-io/github-action の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。