-
Notifications
You must be signed in to change notification settings - Fork 19
89 lines (81 loc) · 2.3 KB
/
master.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
83
84
85
86
87
88
89
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Intel Corporation
name: Master workflow
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Build
run: go build -o build/_output/onos-e2t ./cmd/onos-e2t
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: golangci/[email protected]
with:
version: latest
args: -v --config ./.golangci.yml
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Unit tests
run: go test -race github.com/onosproject/onos-e2t/...
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Build Docker image
run: |
git clone https://github.com/onosproject/build-tools.git build/build-tools
go mod vendor
docker build . -f build/onos-e2t/Dockerfile -t onosproject/onos-e2t:latest
rm -rf vendor
buflint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: buflint
env:
BUF_VERSION: 1.0.0
run: |
cd ..
git clone https://github.com/onosproject/onos-lib-go.git
cd onos-e2t
docker run \
-v `pwd`:/go/src/github.com/onosproject/onos-e2t \
-v `pwd`/../onos-lib-go/api/asn1:/go/src/github.com/onosproject/onos-e2t/api/asn1 \
-w /go/src/github.com/onosproject/onos-e2t/api \
bufbuild/buf:$BUF_VERSION lint --path e2ap
license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: reuse lint
uses: fsfe/reuse-action@v2
fossa-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: FOSSA scan
uses: fossa-contrib/fossa-action@v3
with:
fossa-api-key: 6d304c09a3ec097ba4517724e4a4d17d