-
Notifications
You must be signed in to change notification settings - Fork 481
78 lines (69 loc) · 1.79 KB
/
continuous-integration.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: continuous-integration
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
go-version: [stable, oldstable]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
GO111MODULE: on
steps:
-
name: Checkout code
uses: actions/checkout@v4
-
name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
-
name: Clean module files
run: |
go mod tidy
-
name: Set tusd output
run: |
TUSD_BINARY=$PWD/tusd
if [ "$RUNNER_OS" = "Windows" ]; then
TUSD_BINARY="$TUSD_BINARY.exe"
fi
echo "TUSD_BINARY=$TUSD_BINARY" >> $GITHUB_ENV
shell: bash
-
name: Compile tusd binary
run: |
go build -o $TUSD_BINARY ./cmd/tusd/main.go
shell: bash
-
name: Test code
run: |
go test ./pkg/...
go test ./internal/...
shell: bash
-
name: Vet code
run: |
go vet ./pkg/...
go vet ./internal/...
pages:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
working-directory: '${{ github.workspace }}/docs'
- name: Build with Jekyll
run: bundle exec jekyll build