Running continuous integration locally
Motivation
There are situations where you'll want to run the continuous integration workflow on a development machine. These include:
- You want to check whether your code will pass continuous integration without committing your work.
- You want to work on the continuous integration workflow.
(Optional) Setup
If you want to reproduce the behavior of the remote continuous integration system, you'll need to install Docker and Forgejo Runner.
Install Docker
On Ubuntu 22.04, I used the docker-compose
package, although docker.io
might be enough.
Install Forgejo Runner
Setting up Forgejo Runner for local, manual use is simpler than setting it up for remote, automated use.
On OpenSUSE Tumbleweed, you can install the forgejo-runner
package by calling
sudo zypper install forgejo-runner
On other systems, you may need to install manually.
-
Download these files from the release page:
- The binary
forgejo-runner-#.#.#-linux-amd64
. - (Recommended) The signature
forgejo-runner-#.#.#-linux-amd64.asc
.
- The binary
-
(Recommended) Verify the binary's authenticity by checking its signature.
- Import Forgejo's public signing key by calling
If that doesn't work, you can download the key manually:gpg --keyserver keys.openpgp.org --recv EB114F5E6C0DC2BCDD183550A4B61A2DC5923710
- Search in OpenPGP keyserver web interface for the fingerprint listed after
--recv
above. - Download the key and call
gpg --import
on it.
- Search in OpenPGP keyserver web interface for the fingerprint listed after
- Check the signature by calling
gpg --verify forgejo-runner-#.#.#-linux-amd64.asc forgejo-runner-#.#.#-linux-amd64
- Import Forgejo's public signing key by calling
-
Give the binary permission to be executed by the user who owns it.
-
(Optional) For convenience, put the binary in your command search path. I like to do this by placing two symbolic links in
~/.local/bin
, which is already on my search path:- A link called
forgejo-runner-#.#.#
that points to the location of the binaryforgejo-runner-#.#.#-linux-amd64
. - A link called
forgejo-runner
that points toforgejo-runner-#.#.#
.
Now I can launch a specific version of the runner by calling
forgejo-runner-#.#.#
, and I can launch my chosen default version by callingforgejo-runner
. - A link called
Execution
Running directly on your development system
- Go into the
app-proto
folder and callRUSTFLAGS='-D warnings' cargo test
Continuous integration passes if all the tests pass.
Running in a Docker container using Forgejo Runner
- Go into the top level of the dyna3 repository and call
forgejo-runner exec
This will only work if you've done the setup procedure above.