-
-
Notifications
You must be signed in to change notification settings - Fork 69
45 lines (43 loc) · 1.55 KB
/
tests.yml
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
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@v4
-
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '^1.22.0'
- uses: actions/cache@v4
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 ./...
go build -o splitsh-lite main.go
git config --global init.defaultBranch main
./run-tests.sh