-
Notifications
You must be signed in to change notification settings - Fork 40
93 lines (85 loc) · 2.39 KB
/
commit.yaml
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
83
84
85
86
87
88
89
90
91
92
93
name: commit
on:
push: {}
pull_request: {}
workflow_dispatch:
inputs:
debug_unit:
description: "start tmate before unit tests"
type: boolean
required: false
default: false
jobs:
unit-test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 14
matrix:
os:
- ubuntu-latest
- macos-latest
go-version:
- "1.16"
- "1.17"
- "1.18"
- "1.19"
- "1.20"
- "1.21"
- "1.22"
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: set up go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: lint
uses: golangci/golangci-lint-action@v5
with:
version: v1.57
args: --timeout 5m
# caching issues, see: https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052190775
skip-pkg-cache: true
skip-build-cache: true
- name: install gotestsum
run: go install gotest.tools/[email protected]
- name: setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_unit }}
- name: tests
run: make test-race
functional-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
go-version:
- "1.22"
runtime:
- "docker"
needs:
- unit-test
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: set up go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: install gotestsum
run: go install gotest.tools/gotestsum@latest
# pull the srl image before installing clab so that clab has no need to pull it when starting
# -- make sure this is the same image version that is in the clab ci topo!
- name: pull srlinux image
run: docker pull ghcr.io/nokia/srlinux:23.10.1
- name: install clab
run: bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.48.1
- name: start clab ci topo
run: make deploy-clab-ci
- name: tests
run: make test-ci