Skip to content

Commit 72a67ae

Browse files
committed
Add lint mixin job
1 parent 0f8bc5f commit 72a67ae

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/lint-mixins.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,41 @@ jobs:
4343

4444
- name: List all changed mixins
4545
run: echo '${{ steps.changed-mixins.outputs.all_changed_files }}'
46+
47+
lint-mixin:
48+
name: Lint Mixin
49+
runs-on: ubuntu-latest
50+
permissions:
51+
issues: write
52+
contents: write
53+
pull-requests: write
54+
repository-projects: write
55+
timeout-minutes: 15
56+
needs: [check-for-changed-mixins]
57+
strategy:
58+
matrix:
59+
mixin: ${{ fromJSON(needs.check-for-changed-mixins.outputs.changed-mixins) }}
60+
fail-fast: false
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@v4
64+
with:
65+
fetch-depth: 0
66+
67+
- name: Setup Go
68+
uses: actions/setup-go@v5
69+
with:
70+
go-version: 1.18
71+
72+
- name: Install CI dependencies
73+
run: make install-ci-deps
74+
75+
- name: Install Mixin dependencies
76+
working-directory: ./${{ matrix.mixin }}
77+
run: jb install
78+
79+
- name: Lint Mixin
80+
working-directory: ./${{ matrix.mixin }}
81+
run: mixtool lint mixin.libsonnet
82+
83+

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ install-ci-deps:
55
go install github.com/google/go-jsonnet/cmd/[email protected]
66
go install github.com/google/go-jsonnet/cmd/[email protected]
77
go install github.com/google/go-jsonnet/cmd/[email protected]
8-
go install github.com/monitoring-mixins/mixtool/cmd/mixtool@a9e78b0942a4186162bf170efde7b4b3167d31a4
8+
go install github.com/monitoring-mixins/mixtool/cmd/mixtool@main
99
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected]
1010

1111
fmt:

0 commit comments

Comments
 (0)