-
Notifications
You must be signed in to change notification settings - Fork 3
88 lines (74 loc) · 2.29 KB
/
main.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
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
CodeQL:
name: CodeQL validation
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
OpenAPI:
runs-on: ubuntu-latest
name: OpenAPI validation
# Service containers to run with `runner-job`
services:
# Label used to access the service container
swagger-editor:
# Docker Hub image
image: swaggerapi/swagger-editor
ports:
# Maps port 8080 on service container to the host 80
- 80:8080
steps:
- uses: actions/checkout@v2
- name: Validate OpenAPI definition
uses: swaggerexpert/swagger-editor-validate@452076dc45d5d1f09dd55440c9bffc372de4da25 # Jul 29, 2024
with:
swagger-editor-url: http://localhost/
definition-file: docs/openapi.yaml
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # To get all the tags for versioning
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: RELEASE=1 ./build.sh
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: binaries
path: aquarium-fish*.tar.xz
- name: Test
run: |
go install github.com/jstemmer/go-junit-report/v2@85bf471 # Oct 18, 2023
name="$(ls aquarium-fish-*.linux_amd64)"
FISH_PATH="$PWD/$name" go test -v -failfast -parallel 4 -count=1 ./tests/... 2>&1 | go-junit-report -iocopy -set-exit-code -out report.xml
- name: Benchmarks
run: go run go.bobheadxi.dev/gobenchdata@v1 action
env:
INPUT_PRUNE_COUNT: 30
INPUT_GO_TEST_FLAGS: "-run=^# -cpu 1,2 -benchmem"
INPUT_CHECKS: true
INPUT_CHECKS_CONFIG: gobenchdata-checks.yml
- name: Test Summary
uses: test-summary/action@v2
if: always()
with:
paths: report.xml