-
Notifications
You must be signed in to change notification settings - Fork 163
82 lines (70 loc) · 1.93 KB
/
lint-mixins.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
---
name: Mixin
permissions:
contents: read
on:
# To conserve resources we only run tests against main in PRs
pull_request:
branches:
- master
jobs:
check-for-changed-mixins:
name: Check for changes
runs-on: ubuntu-latest
outputs:
changed-mixins: ${{ steps.changed-mixins.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: Install CI dependencies
run: make install-ci-deps
- name: Get changed mixins
id: changed-mixins
uses: tj-actions/changed-files@v44
with:
dir_names: true
dir_names_exclude_current_dir: true
dir_names_max_depth: 1
files: |
**-mixin/
**-observ-lib/
matrix: true
- name: List all changed mixins
run: echo '${{ steps.changed-mixins.outputs.all_changed_files }}'
lint-mixin:
name: Run Mixtool
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
pull-requests: write
repository-projects: write
timeout-minutes: 15
needs: [check-for-changed-mixins]
strategy:
matrix:
mixin: ${{ fromJSON(needs.check-for-changed-mixins.outputs.changed-mixins) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: Install CI dependencies
run: make install-ci-deps
- name: Install Mixin dependencies
working-directory: ./${{ matrix.mixin }}
run: jb install
- name: Lint Mixin
working-directory: ./${{ matrix.mixin }}
run: mixtool lint mixin.libsonnet