Skip to content

Commit d72382f

Browse files
committed
generalize lint/test workflows
1 parent 5cc64c4 commit d72382f

1 file changed

Lines changed: 19 additions & 31 deletions

File tree

.github/workflows/lint_test.yml

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,34 @@ on:
99
pull_request:
1010

1111
jobs:
12-
aws-lint:
13-
name: aws-lint
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v4
17-
- name: Run golangci-lint
18-
uses: golangci/golangci-lint-action@v4
19-
with:
20-
working-directory: aws
21-
22-
aws-test:
23-
name: aws-test
12+
lint:
2413
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
providers:
17+
- aws
18+
- azure
2519
steps:
2620
- uses: actions/checkout@v4
2721
- uses: actions/setup-go@v5
2822
with:
29-
go-version: '1.24'
30-
- name: Run Unit tests
31-
run: make test
32-
working-directory: ./aws
33-
34-
azure-lint:
35-
name: azure-lint
36-
runs-on: ubuntu-latest
37-
steps:
38-
- uses: actions/checkout@v4
39-
- name: Run golangci-lint
40-
uses: golangci/golangci-lint-action@v4
41-
with:
42-
working-directory: azure
23+
go-version-file: './${{ matrix.providers }}/go.mod'
24+
- name: Run Lint
25+
working-directory: ./${{ matrix.providers }}
26+
run: make lint
4327

44-
azure-test:
45-
name: azure-test
28+
test:
4629
runs-on: ubuntu-latest
30+
strategy:
31+
matrix:
32+
providers:
33+
- aws
34+
- azure
4735
steps:
4836
- uses: actions/checkout@v4
4937
- uses: actions/setup-go@v5
5038
with:
51-
go-version: '1.24'
52-
- name: Run Unit tests
39+
go-version-file: './${{ matrix.providers }}/go.mod'
40+
- name: Run Lint
41+
working-directory: ./${{ matrix.providers }}
5342
run: make test
54-
working-directory: ./azure

0 commit comments

Comments
 (0)