splitsh-lite/.github/workflows/tests.yml

43 lines
1.4 KiB
YAML
Raw Normal View History

2023-10-25 21:48:23 +02:00
name: tests
on:
pull_request:
push:
jobs:
update:
name: Run tests
runs-on: ubuntu-latest
steps:
-
2024-03-07 15:34:59 +01:00
name: Install deps
run: sudo apt-get install -y pkg-config cmake
2023-10-25 21:48:23 +02:00
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Go
uses: actions/setup-go@v3
with:
2024-03-01 20:15:34 +01:00
go-version: '^1.22.0'
2023-10-25 21:48:23 +02:00
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
-
2024-03-07 15:34:59 +01:00
name: Building
2023-10-25 21:48:23 +02:00
run: |
2024-03-07 15:34:59 +01:00
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
2023-10-25 21:48:23 +02:00
-
name: Test
2024-03-07 15:34:59 +01:00
run: |
export PKG_CONFIG_PATH=/home/runner/work/lite/lite/vendor/github.com/libgit2/git2go/v34/static-build/build
go test -v ./...