vidal-community / atom-jaxb

Compliant Atom feeds with JAXB
MIT License
2 stars 2 forks source link

Bring back Continuous Integration via `GitHub Actions` 👷 #85

Closed nicokosi closed 9 months ago

nicokosi commented 2 years ago

Travis CI was used for Continuous Integration / Deployment, years ago. It may still be possible to ask for a free plan for OSS, but for the moment, CI/CD does not work anymore: image

I propose to use GitHub Actions instead of Travis CI.

See commit messages for details. 👀

jcgay commented 2 years ago

Par contre je pense qu'il manque toute la partie couverture de code et coveralls et tout le tralala 😇

nicokosi commented 2 years ago

Par contre je pense qu'il manque toute la partie couverture de code et coveralls et tout le tralala innocent

Oui, c'est ce qu'il me semblait aussi. :innocent:

nicokosi commented 2 years ago

Par contre je pense qu'il manque toute la partie couverture de code et coveralls et tout le tralala innocent

J'ai ajouté la couverture de code et la publication Maven dans 196d8af.

J'ai testé la couverture de code via act en mettant temporairement le token qui va bien :

act --workflows .github/workflows/ci.yml

:

| [INFO] Starting Coveralls job
| [INFO] Using repository token <secret>
| [INFO] Git commit b215fb5 in bring-back-ci-via-github-actions
| [INFO] Writing Coveralls data to /home/nkosinski/work/atom-jaxb/target/coveralls.json...
| [INFO] Processing coverage report from /home/nkosinski/work/atom-jaxb/target/site/jacoco/jacoco.xml
| [INFO] Successfully wrote Coveralls data in 119ms
| [INFO] Gathered code coverage metrics for 22 source files with 1800 lines of code:
| [INFO] - 538 relevant lines
| [INFO] - 410 covered lines
| [INFO] - 128 missed lines
| [INFO] Submitting Coveralls data to API
| [INFO] Successfully submitted Coveralls data in 1198ms for Job ##284.1
| [INFO] https://coveralls.io/jobs/99690218
| [INFO] *** It might take hours for Coveralls to update the actual coverage numbers for a job
| [INFO]     If you see question marks in the report, please be patient
| [INFO] ------------------------------------------------------------------------
| [INFO] BUILD SUCCESS
| [INFO] ------------------------------------------------------------------------
| [INFO] Total time:  35.368 s
| [INFO] Finished at: 2022-05-18T15:39:23Z
| [INFO] ------------------------------------------------------------------------
[CI/finish]   ✅  Success - Generate code coverage

Ca a généré ce rapport : https://coveralls.io/jobs/99690218

Et j'ai défini la variable d'environnement COVERALLS_TOKEN dans GitHub : image

nicokosi commented 2 years ago

Par contre je pense qu'il manque toute la partie couverture de code et coveralls et tout le tralala innocent

J'ai ajouté la couverture de code et la publication Maven dans 196d8af.

J'ai testé la couverture de code via act en mettant temporairement le token qui va bien :

act --workflows .github/workflows/ci.yml

:

| [INFO] Starting Coveralls job
| [INFO] Using repository token <secret>
| [INFO] Git commit b215fb5 in bring-back-ci-via-github-actions
| [INFO] Writing Coveralls data to /home/nkosinski/work/atom-jaxb/target/coveralls.json...
| [INFO] Processing coverage report from /home/nkosinski/work/atom-jaxb/target/site/jacoco/jacoco.xml
| [INFO] Successfully wrote Coveralls data in 119ms
| [INFO] Gathered code coverage metrics for 22 source files with 1800 lines of code:
| [INFO] - 538 relevant lines
| [INFO] - 410 covered lines
| [INFO] - 128 missed lines
| [INFO] Submitting Coveralls data to API
| [INFO] Successfully submitted Coveralls data in 1198ms for Job ##284.1
| [INFO] https://coveralls.io/jobs/99690218
| [INFO] *** It might take hours for Coveralls to update the actual coverage numbers for a job
| [INFO]     If you see question marks in the report, please be patient
| [INFO] ------------------------------------------------------------------------
| [INFO] BUILD SUCCESS
| [INFO] ------------------------------------------------------------------------
| [INFO] Total time:  35.368 s
| [INFO] Finished at: 2022-05-18T15:39:23Z
| [INFO] ------------------------------------------------------------------------
[CI/finish]   ✅  Success - Generate code coverage

Ca a généré ce rapport : https://coveralls.io/jobs/99690218

Et j'ai défini la variable d'environnement COVERALLS_TOKEN dans GitHub : image

Par contre, j'imagine qu'il manque les variables d'environnement pour la publication Maven. Un avis, @jcgay ? :innocent:

jcgay commented 2 years ago

Par contre je pense qu'il manque toute la partie couverture de code et coveralls et tout le tralala innocent

J'ai ajouté la couverture de code et la publication Maven dans 196d8af. J'ai testé la couverture de code via act en mettant temporairement le token qui va bien :

act --workflows .github/workflows/ci.yml

:

| [INFO] Starting Coveralls job
| [INFO] Using repository token <secret>
| [INFO] Git commit b215fb5 in bring-back-ci-via-github-actions
| [INFO] Writing Coveralls data to /home/nkosinski/work/atom-jaxb/target/coveralls.json...
| [INFO] Processing coverage report from /home/nkosinski/work/atom-jaxb/target/site/jacoco/jacoco.xml
| [INFO] Successfully wrote Coveralls data in 119ms
| [INFO] Gathered code coverage metrics for 22 source files with 1800 lines of code:
| [INFO] - 538 relevant lines
| [INFO] - 410 covered lines
| [INFO] - 128 missed lines
| [INFO] Submitting Coveralls data to API
| [INFO] Successfully submitted Coveralls data in 1198ms for Job ##284.1
| [INFO] https://coveralls.io/jobs/99690218
| [INFO] *** It might take hours for Coveralls to update the actual coverage numbers for a job
| [INFO]     If you see question marks in the report, please be patient
| [INFO] ------------------------------------------------------------------------
| [INFO] BUILD SUCCESS
| [INFO] ------------------------------------------------------------------------
| [INFO] Total time:  35.368 s
| [INFO] Finished at: 2022-05-18T15:39:23Z
| [INFO] ------------------------------------------------------------------------
[CI/finish]   ✅  Success - Generate code coverage

Ca a généré ce rapport : https://coveralls.io/jobs/99690218 Et j'ai défini la variable d'environnement COVERALLS_TOKEN dans GitHub : image

Par contre, j'imagine qu'il manque les variables d'environnement pour la publication Maven. Un avis, @jcgay ? 😇

Yep il va falloir les ajouter, elles sont référencées dans https://github.com/vidal-community/atom-jaxb/blob/master/deploy-settings.xml qu'il faut ajouter à la ligne de commande avec l'option --settings ./deploy-settings.xml.

nicokosi commented 9 months ago

Je déterre cette PR. :nerd_face:

nicokosi commented 9 months ago

J'ai mis à jour et simplifié le workflow dans e1d2ff9. Ca fonctionne en local avec gh act (cf. nektos/act installé comme une extention GitHub CLI), sauf les parties rapport de couverture / déploiement que je n'ai pas testées, et cette erreur bizarre Post actions/setup-java@v3 :see_no_evil: :

[CI/build]   ✅  Success - Main Build and test
[CI/build] ⭐ Run Main Report code coverage
[CI/build]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/4] user= workdir=
| Hooray!
[CI/build]   ✅  Success - Main Report code coverage
[CI/build] ⭐ Run Post actions/setup-java@v3
[CI/build]   🐳  docker exec cmd=[node /var/run/act/actions/actions-setup-java@v3/dist/cleanup/index.js] user= workdir=
[CI/build]   💬  ::debug::Checking zstd --version
[CI/build]   💬  ::debug::*** zstd command line interface 64-bits v1.4.8, by Yann Collet ***
[CI/build]   💬  ::debug::implicitDescendants 'false'
[CI/build]   💬  ::debug::followSymbolicLinks 'true'
[CI/build]   💬  ::debug::implicitDescendants 'false'
[CI/build]   💬  ::debug::omitBrokenSymbolicLinks 'true'
[CI/build]   💬  ::debug::Search path '/root/.m2/repository'
[CI/build]   💬  ::debug::Matched: ../../../../root/.m2/repository
[CI/build]   💬  ::debug::Cache Paths:
[CI/build]   💬  ::debug::["../../../../root/.m2/repository"]
[CI/build]   💬  ::debug::Archive Path: /tmp/0245cc12-8569-4a14-803c-95f4d47ed4cd/cache.tzst
| [command]/usr/bin/tar --posix --use-compress-program zstdmt -cf cache.tzst --exclude cache.tzst -P -C /home/nkosinski@france.groupe.intra/work/atom-jaxb --files-from manifest.txt
[CI/build]   💬  ::debug::File Size: 35944320
[CI/build]   💬  ::debug::Reserving Cache
[CI/build]   💬  ::debug::Resource Url: http://192.168.0.50:35297/_apis/artifactcache/caches
ERRO[0012] POST /_apis/artifactcache/caches: already exist  module=artifactcache
[CI/build]   🚧  ::warning::Failed to save: {"error":"already exist"}
| Cache saved with the key: setup-java-Linux-maven-9bffa6397bbd566f83107c84de3081a0fd1e1d62a5a994ecf2d9d45bed4158e4
[CI/build]   ✅  Success - Post actions/setup-java@v3
[CI/build] 🏁  Job succeeded
nicokosi commented 9 months ago

Intégré un peu vite (ça ne fonctionne pas) : image

https://github.com/vidal-community/atom-jaxb/actions

nicokosi commented 9 months ago

La suite dans https://github.com/vidal-community/atom-jaxb/pull/94.