micro-ci

Crates.iomicro-ci
lib.rsmicro-ci
version0.1.1
sourcesrc
created_at2019-09-19 19:50:53.817769
updated_at2019-09-19 20:05:15.305373
descriptionTiny self-hosted CI with minimal requirements
homepage
repositoryhttps://github.com/boringcactus/micro-ci
max_upload_size
id166051
size86,162
Melody Horn (boringcactus)

documentation

README

micro-ci

Tiny self-hosted CI with minimal requirements.

Installation

cargo install micro-ci or yoink a Linux binary of the latest release.

Configuration

Global configuration on the server goes in micro-ci.toml in the config_dir() found by dirs Get yourself a GitHub access token here. Make sure you can serve static files over HTTP from some directory to some URL - in the use case for which I'm developing this, I can toss files in ~/public_html and they're public. micro-ci will make a subfolder for each project you build with it, so I've got it pointed at ~/public_html/ci.

github_token = "asdfghjkl"
web_root_path = "/path/to/folder"
web_root_url = "https://example.com/url/for/same/folder"
fetch_interval = 60 # measured in seconds

Local (per-repository) configuration goes in .micro-ci.toml at the same level where your command should be run. Command will be run with bash -c <command> 2>&1 so either be concise or write a helper script. (This probably means micro-ci doesn't work as well on Windows.)

github_repo = "boringcactus/micro-ci"
command = "cargo test"

Usage

For each repository you want to use micro-ci to test:

  • Clone it somewhere you won't manually touch
  • Check out the branch you want to run tests on
  • Run micro-ci in the folder where .micro-ci.toml lives and your test script should be run
  • To make micro-ci always run tests on the current commit, run micro-ci --run-now
  • For verbose logging if something's broken, set RUST_LOG=micro_ci=debug
Commit count: 13

cargo fmt