printers-for-people / catboat

Improve your pronter, nyan!
GNU General Public License v3.0
21 stars 6 forks source link

Add guide for testing locally #46

Open Jookia opened 1 week ago

Jookia commented 1 week ago

I've managed to run tests locally using this in my shell:

git worktree add wt_ci
cd wt_ci
distrobox create --image ubuntu-20.04 --name catboat-ci
distrobox enter catboat-ci
sudo apt install git
./scripts/ci-install.sh
./scripts/ci-build.sh 2>&1

This seems to work well enough.

Jookia commented 1 week ago

I just realized this runs the following code:

    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"

Oof, this overwrote my git username... Might be worth adding a check there or setting distrobox to not share the home directory.

Jookia commented 1 week ago

This seems to be the best instructions so far:

git worktree add wt_ci
cd wt_ci
distrobox create --image ubuntu:20.04 --name catboat-ci --additional-packages "git" --home "$PWD/dbx_home"
distrobox enter catboat-ci -- "./scripts/ci-install.sh"
distrobox enter catboat-ci -- "./scripts/ci-build.sh 2>&1"