-
Notifications
You must be signed in to change notification settings - Fork 3
123 lines (108 loc) · 2.97 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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
workflow_run:
workflows:
- Generate Database
types:
- completed
env:
JAVA_VERSION: "11"
JAVA_DISTRIBUTION: temurin
GOLANG_VERSION: "1.18"
GOLANG_CI_LINT_VERSION: "v1.45"
jobs:
flutter-build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: client
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- run: flutter pub get
- run: flutter pub run build_runner build
- run: flutter analyze
- run: flutter test
- run: flutter build apk
go-build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: server
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GOLANG_VERSION }}
- uses: golangci/golangci-lint-action@v2
with:
working-directory: server
version: ${{ env.GOLANG_CI_LINT_VERSION }}
- run: go test -v --race -coverprofile=coverage.txt -covermode=atomic ./...
- run: go build -o server cmd/server/main.go
- run: go build -o client cmd/client/main.go
- run: bash <(curl -s https://codecov.io/bash) -F server
dbctl-build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: dbctl
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GOLANG_VERSION }}
- run: go test -v --race -coverprofile=coverage.txt -covermode=atomic ./...
- run: go build main.go
- run: bash <(curl -s https://codecov.io/bash) -F dbctl
deploy-to-okteto:
runs-on: ubuntu-latest
# Okteto is no longer available.
if: false # github.ref == 'refs/heads/main'
needs:
- go-build
steps:
- uses: actions/checkout@v2
- uses: okteto/login@main
with:
token: ${{ secrets.KKWEON_OKTETO_TOKEN }}
- uses: okteto/namespace@main
with:
namespace: kkweon
- uses: okteto/pipeline@main
with:
name: pr12er
timeout: 10m
deploy-to-gh-pages:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs:
- flutter-build
defaults:
run:
working-directory: client
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- run: flutter pub get
- run: flutter build web --release
- uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: ./client/build/web