-
Notifications
You must be signed in to change notification settings - Fork 598
70 lines (65 loc) · 1.82 KB
/
callbacks.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
name: Callbacks Module
# This workflow runs when a PR is opened that targets code that is part of the callbacks module.
on:
merge_group:
pull_request:
push:
branches:
- main
permissions:
contents: read
pull-requests: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: golangci/[email protected]
with:
version: v1.57.2
only-new-issues: true
args: --timeout 5m
working-directory: modules/apps/callbacks
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ['amd64', 'arm', 'arm64']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Build callbacks-module
run: |
cd modules/apps/callbacks
GOARCH=${{ matrix.go-arch }} go build ./...
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Go Test
run: |
cd modules/apps/callbacks
go test -v -mod=readonly ./... -coverprofile=coverage.out
code-analysis:
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
needs: [tests]
steps:
- name: sonarcloud
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }}
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: modules/apps/callbacks/