-
Notifications
You must be signed in to change notification settings - Fork 59
52 lines (43 loc) · 1.29 KB
/
go.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
name: Run Go Tests
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}'
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
paths:
- 'src/openstack_cpi_golang/**'
push:
branches:
- master
jobs:
go:
strategy:
matrix:
os: [macos-latest, windows-2019, ubuntu-latest]
name: Run tests and Lint on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: src/openstack_cpi_golang/go.mod
- name: Run golangci-lint
if: ${{ matrix.os != 'windows-2019' }}
uses: golangci/golangci-lint-action@v6
with:
working-directory: src/openstack_cpi_golang
- name: Run golangci-lint
if: ${{ matrix.os == 'windows-2019' }}
uses: golangci/golangci-lint-action@v6
with:
working-directory: src/openstack_cpi_golang
args: --disable=goimports
- name: Run unit tests
run: scripts/run-unit-tests
working-directory: src/openstack_cpi_golang
- name: Run integration tests
run: scripts/run-integration-tests
working-directory: src/openstack_cpi_golang