CONTRIBUTING.md

Contributing to gitlabr

You're welcome to contribute to gitlabr by editing the source code, adding more convenience functions, filing issues, etc. This document compiles some information helpful in that process.

Please also note the Code of Conduct.

Setup a local development environment

If you want to run the test suite locally, you need to setup a a Gitlab instance for testing. Then, in the file tests/environment.yml configuration variables are recorded about how to connect to the gitlab instance. tests/environment.yml.example contains an example configuration for a server that is, however, not publicly available for a testing.

How to create a test server

The gitlab test suite expects certain entities (user, project, files) to be present in the test server. Here is how to setup a test server:

How to run the test suite

When the test server is set up as described above tests can be run with the following R code that loads the recorded environment variables and runs the test code:

library(devtools)
library(yaml)
do.call(Sys.setenv, yaml.load_file("tests/environment.yml")) ## load test environment variables
test() ## run tests

API version

The test suite is intended for use with Gitlab API v4, compatibility with API v3 is no longer maintained. Still, you can switch to run the tests against API v3, by setting the environment variable GITLABR_TEST_API_VERSION to value v3. Note that API v3 is not present in recent gitlab versions!



jirkalewandowski/gitlabr documentation built on May 19, 2019, 11:37 a.m.