-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.43 KB
/
execute_tests.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
name: PR checks
permissions:
id-token: write # required to use OIDC authentication
contents: read # required to check out the code from the repo
on:
workflow_dispatch:
inputs: {}
pull_request:
jobs:
check-go:
name: Lint & execute go tests
runs-on: ubuntu-latest
strategy:
matrix:
dir: ["cloudwatchmetrics", "csvexport"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::917827854074:role/technical/github/github-technical-20240307102201359300000002
role-duration-seconds: 900 # the ttl of the session, in seconds.
aws-region: eu-central-1
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22.x"
- name: Install dependencies
run: |
go version
go install golang.org/x/lint/golint@latest
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
only-new-issues: true
args: --issues-exit-code=0 --timeout 300s
working-directory: "./pkg/${{ matrix.dir }}"
- name: Check
run: |
go vet ./...
golint ./...
working-directory: "./pkg/${{ matrix.dir }}"
- name: Test
run: |
go test ./...
working-directory: "./pkg/${{ matrix.dir }}"