-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (69 loc) · 2.04 KB
/
template-check.yaml
File metadata and controls
83 lines (69 loc) · 2.04 KB
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
name: Template Check
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
detect-changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
kotlin-spring: ${{ steps.filter.outputs.kotlin-spring }}
go-gin: ${{ steps.filter.outputs.go-gin }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check changed files
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
kotlin-spring:
- 'kotlin/spring/**'
- '.github/workflows/template-check.yaml'
go-gin:
- 'go/gin/**'
- '.github/workflows/template-check.yaml'
verify-kotlin-spring:
needs: detect-changes
if: needs.detect-changes.outputs.kotlin-spring == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.16.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Verify Kotlin Spring Template Builds
run: bazel build //...
working-directory: kotlin/spring
- name: Verify Kotlin Spring Template Tests
run: bazel test //...
working-directory: kotlin/spring
verify-go-gin:
needs: detect-changes
if: needs.detect-changes.outputs.go-gin == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.16.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Setup Go dependencies
run: bazel mod tidy
working-directory: go/gin
- name: Verify Go Gin Template Builds
run: bazel build //...
working-directory: go/gin
- name: Verify Go Gin Template Tests
run: bazel test //...
working-directory: go/gin