-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.29 KB
/
ci.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
46
47
48
49
50
51
name: Karman CI
on:
pull_request:
push:
branches: [ main ]
tags: [ "*" ]
permissions:
contents: read
jobs:
lint:
name: Lint
permissions:
contents: read
pull-requests: read
uses: codello/.github/.github/workflows/go-lint.yml@v1
with:
args: --timeout=5m
unit-test:
name: Unit Tests
uses: codello/.github/.github/workflows/go-test.yml@v1
with:
test-on: ubuntu-latest,ubuntu-20.04,windows-latest,macos-latest
integration-test:
name: Integration Tests
uses: ./.github/workflows/integration-tests.yml
with:
test-on: ubuntu-latest,ubuntu-20.04
build:
name: Build
uses: codello/.github/.github/workflows/go-build.yml@v1
with:
packages: ./cmd/karman
platforms: linux/amd64,linux/arm64,linux/arm,linux/386,windows/amd64,darwin/amd64,darwin/arm64
ldflags: -w -s -X "main.Version=${{ github.ref_type == 'tag' && github.ref_name || '' }}"
publish:
name: Publish
if: ${{ github.event_name == 'push' }}
needs: [ unit-test, integration-test, build ]
permissions:
contents: read
packages: write
uses: codello/.github/.github/workflows/docker-publish.yml@v1
with:
image: ${{ github.repository_owner }}/server
platforms: linux/amd64,linux/arm64,linux/arm,linux/386