generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
100 lines (100 loc) · 2.5 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
on:
push:
branches:
- main
pull_request:
name: CI
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
kotlin-runtime:
name: Test Kotlin
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Test
run: mvn test
test:
name: Test Go
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Cache Go Modules
uses: ./.github/actions/go-cache
- name: Docker Compose
run: docker compose up -d --wait
- name: Test
run: go test ./...
sql:
name: SQL
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Docker Compose
run: docker compose up -d --wait
- name: Initialise database
run: ftl-initdb --recreate
- name: Vet SQL
run: sqlc vet
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Cache Go Modules
uses: ./.github/actions/go-cache
- name: golangci-lint
run: golangci-lint run
- name: go-check-sumtype
run: go-check-sumtype ./...
- name: shellcheck
run: shellcheck -e SC2016 scripts/*
console:
name: Console
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Console NPM Install
working-directory: console/client
run: npm install
- name: Console Type Check
working-directory: console/client
run: tsc
- name: Console Lint
working-directory: console/client
run: npm run lint
- name: Console Test
working-directory: console/client
run: npm run test
integration:
name: Integration Tests
if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/integration.yml
autoversion:
name: Auto Version
secrets: inherit
if: github.ref == 'refs/heads/main'
needs:
- kotlin-runtime
- test
- lint
- console
- integration
- sql
uses: ./.github/workflows/autoversion.yml