-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (65 loc) · 1.82 KB
/
go-tests.yml
File metadata and controls
71 lines (65 loc) · 1.82 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
name: go-tests
on:
pull_request:
paths:
- "integrations/acptext/**"
- "api/**"
- "operator/**"
- "integrations/github-app/**"
- "integrations/slack-gateway/**"
- ".github/workflows/go-tests.yml"
push:
branches:
- main
paths:
- "integrations/acptext/**"
- "api/**"
- "operator/**"
- "integrations/github-app/**"
- "integrations/slack-gateway/**"
- ".github/workflows/go-tests.yml"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: acptext
working-directory: integrations/acptext
- name: api
working-directory: api
- name: operator
working-directory: operator
- name: integrations-github-app
working-directory: integrations/github-app
- name: integrations-slack-gateway
working-directory: integrations/slack-gateway
defaults:
run:
working-directory: ${{ matrix.working-directory }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: ${{ matrix.working-directory }}/go.mod
cache-dependency-path: ${{ matrix.working-directory }}/go.*
- name: Test
run: go test ./...
docker-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: api
dockerfile: api/Dockerfile
- name: integrations-slack-gateway
dockerfile: integrations/slack-gateway/Dockerfile
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build image
run: docker build -f "${{ matrix.dockerfile }}" . -t "spritz-${{ matrix.name }}-ci"