Run tests #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
pull_request: | |
push: | |
jobs: | |
update: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Install deps | |
run: sudo apt-get install -y pkg-config cmake | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '^1.22.0' | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- | |
name: Building | |
run: | | |
go mod vendor | |
rm -rf vendor/github.com/libgit2/git2go | |
git clone https://github.com/libgit2/git2go vendor/github.com/libgit2/git2go/v34 | |
cd vendor/github.com/libgit2/git2go/v34 && git checkout v34.0.0 && git submodule update --init && make install-static | |
- | |
name: Test | |
run: | | |
export PKG_CONFIG_PATH=/home/runner/work/lite/lite/vendor/github.com/libgit2/git2go/v34/static-build/build | |
go test -v ./... | |
./run-tests.sh |