blob: 79be474edf2e41c6ed8e723e4f88d5f70fbb9d56 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
Workspace setup
---------------
* Create a virtual Python environment: `make venv`
* Use the virtual environment: `. .venv/bin/activate`
* Deactivate the environment when you're done: `deactivate`
Testing
-------
N.B.: `make test` is a shortcut for unit tests and the "basic" integration
tests.
### Unit tests
make test/unit
You need to set the following environment variables for the authenticated
access tests to work:
* `CGITIZE_BITBUCKET_EMAIL`
* `CGITIZE_BITBUCKET_TOKEN`
* `CGITIZE_GITHUB_USERNAME`
* `CGITIZE_GITHUB_TOKEN`
* `CGITIZE_GITLAB_USERNAME`
* `CGITIZE_GITLAB_TOKEN`
You can run `. test/set_credentials.sh`; it'll ask you to fill in the secrets.
### Integration
make test/integration
* The "example" tests use the forges' APIs and might easily hit their rate
limits.
Use the tokens used for unit tests.
* Additionally, it tests cloning via SSH (the `clone_via_ssh` setting) too, so
you need to add the secret project-specific SSH key to your agent as well (make
sure it's the only one in the agent; if there's a key associated with another
user, it could get used instead).
* Run only basic integration tests:
make test/integration/basic
### Docker setup
sudo make test/docker
It's a separate test to check Docker container building & setup.
Upgrading dependencies
----------------------
* Upgrade virtual environment packages: `make venv/upgrade`.
`make maintenance` does that and pushes a commit to the upstream.
* Upgrade base Docker images.
* Find the current base images using `git grep -P 'FROM \w+:'`
* Upgrade the [cmark-gfm] version used in the [cgitize-frontend Docker image].
[cmark-gfm]: https://github.com/github/cmark-gfm
[cgitize-frontend Docker image]: docker/frontend/Dockerfile
Releases
--------
* For a new major version, update the version in the docker-compose definition
in docker/README.md.
* Update CHANGELOG.md if necessary.
* Make a new tag using the semantic versioning policy (you can use [tag-release]
to do that), review and push it.
[tag-release]: https://github.com/egor-tensin/tag-release
|