gitlabr
gitlabr copied to clipboard
Create unit tests with fake projects to test `use_gitlab_ci()`
We will create a new project on GitLab.com to test CI.
During the tests, we do not want to send a gitlab-ci file to this project and wait for the CI to finish before continuing the unit tests, it would be too long.
Hence, we will ask the dev to send the new gitlab-ci file manually, with command line already prepared, before the tests.
During the tests, we will check: (1) if the gitlab-ci file on gitlab.com is the last version as in the package, and if not, the local test should fail, asking to send the last version. (2) if this is the same file, then verify that the CI did not fail on the project
How to do it:
- [ ] Update instructions in "dev/create_testor_on_gitlab.R" to create 3 more GitLab project on Gitlab.com
- [ ] bookdown project
- [ ] classical package
- [ ] package dev using {renv}
- [ ] Update instructions on CONTRIBUTING.md
- [ ] Add script to explain how to update projects with new CI file.
use_gitlab_ci()and send file withgl_push_file() - Need that CI was already run (sent from local manually)
- Send from locally
if(test_project_name %in% c("testor.main")) {}
- Send from locally
- Test only for one OS (CI) with
if(test_project_name %in% c("testor.main", "testor.release")) {}- Verify that .gitlab-ci.yml is the same in the project than in the last version of the package, otherwise fails test to ask to re-send locally.
- Then if the same, verify that CI has run properly