-
Notifications
You must be signed in to change notification settings - Fork 66
executable file
·37 lines (33 loc) · 1.18 KB
/
test.yaml
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
name: Testing
on: [push, pull_request]
jobs:
build:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "^1.15.5"
# Because of a bug in go-git that that makes cloning of a folder in another Windows drive letter,
# the test has to be moved and run in another folder on Windows (until the bug is fixed)
# https://github.com/go-git/go-git/issues/247
- name: Make sure the Windows test is run on the correct drive
if: matrix.os == 'windows-latest'
run: copy-item -Path "." -Destination "$env:temp\multi-gitter" -Recurse
- name: Test (Windows)
if: matrix.os == 'windows-latest'
run: $env:SKIP_TYPES='time-dependent'; cd $env:temp\multi-gitter; go test ./... -v
- name: Test (Not Windows)
if: matrix.os != 'windows-latest'
run: SKIP_TYPES=time-dependent go test ./... -v
- name: Build
run: go build main.go