forked from llm-d/llm-d-async
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (67 loc) · 1.9 KB
/
Copy pathpre-commit.yml
File metadata and controls
82 lines (67 loc) · 1.9 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
name: Pre-commit
on:
push:
branches:
- main
- 'release-*'
pull_request:
concurrency:
group: pre-commit-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Install Helm
uses: azure/setup-helm@v5
- name: Install pre-commit tools
run: make install-pre-commit-tools
- name: Run pre-commit hooks
uses: pre-commit/action@v3.0.1
- name: Run integration tests
run: make test-integration
- name: Lint Helm chart
run: helm lint charts/async-processor
- name: Run Helm unit tests
run: |
helm plugin install --version v1.0.3 --verify=false https://github.com/helm-unittest/helm-unittest.git
helm unittest charts/async-processor
check-code-changes:
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
has_code_changes: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v7
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
code:
- '!docs/**'
- '!**/*.md'
- '!LICENSE'
- '!OWNERS'
container-build:
runs-on: ubuntu-latest
needs: check-code-changes
if: needs.check-code-changes.outputs.has_code_changes == 'true'
steps:
- uses: actions/checkout@v7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build container (no push)
run: |
docker buildx build \
--platform linux/amd64 \
--tag test-build:pr-${{ github.event.pull_request.number }} \
.