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

Aperta
#508 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cypress, github-actions, rails, ruby
Ambito
ci-cd, testing

Direzione di ricerca

Inizia dalla documentazione collegata di start-server e dalla configurazione start e wait-on del workflow. Analizza come l’action arresta il processo Rails al termine di Cypress e se il processo termina in modo sufficientemente pulito da consentire la generazione del report di coverage prima dell’upload; l’attività è completata quando il report di SimpleCov è disponibile alla fine del workflow.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
1.5k
Fork
356
Merge medio
1g 9h
PR unite (30g)
28

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cypress-io/github-action

Tutte le issue di cypress-io/github-action

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.