Skip to content

Commit 4f42ddc

Browse files
GHA-integration initial commit (#648)
* GHA-integration initial commit * Update master.yml * Update .github/dependabot.yml Co-authored-by: gab-arrobo <gabriel.arrobo@intel.com> * Update .github/workflows/master.yml Co-authored-by: gab-arrobo <gabriel.arrobo@intel.com> --------- Co-authored-by: gab-arrobo <gabriel.arrobo@intel.com>
1 parent c3c2cf5 commit 4f42ddc

File tree

3 files changed

+120
-1
lines changed

3 files changed

+120
-1
lines changed

.github/dependabot.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright 2024 Intel Corporation
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
12+
- package-ecosystem: "docker"
13+
directory: "build/onos-e2t"
14+
schedule:
15+
interval: "weekly"
16+
17+
- package-ecosystem: "docker"
18+
directory: "build/onos-e2t-sim-app"
19+
schedule:
20+
interval: "weekly"
21+
22+
- package-ecosystem: "gomod"
23+
directory: "/"
24+
schedule:
25+
interval: "weekly"
26+
27+
- package-ecosystem: "gomod"
28+
directory: "/test"
29+
schedule:
30+
interval: "weekly"

.github/workflows/master.yml

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright 2024 Intel Corporation
3+
4+
name: Master workflow
5+
on:
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version-file: 'go.mod'
19+
- name: Build
20+
run: go build -o build/_output/onos-e2t ./cmd/onos-e2t
21+
22+
lint:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-go@v5
27+
with:
28+
go-version-file: 'go.mod'
29+
- uses: golangci/golangci-lint-action@v4.0.0
30+
with:
31+
version: latest
32+
args: -v --config ./.golangci.yml
33+
34+
unit-tests:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: actions/setup-go@v5
39+
with:
40+
go-version-file: 'go.mod'
41+
- name: Unit tests
42+
run: go test -race github.com/onosproject/onos-e2t/...
43+
44+
docker-build:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: actions/setup-go@v5
49+
with:
50+
go-version-file: 'go.mod'
51+
- name: Build Docker image
52+
run: |
53+
git clone https://github.com/onosproject/build-tools.git build/build-tools
54+
go mod vendor
55+
docker build . -f build/onos-e2t/Dockerfile -t onosproject/onos-e2t:latest
56+
rm -rf vendor
57+
58+
buflint:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
- name: buflint
63+
env:
64+
BUF_VERSION: 1.0.0
65+
run: |
66+
cd ..
67+
git clone https://github.com/onosproject/onos-lib-go.git
68+
cd onos-e2t
69+
docker run \
70+
-v `pwd`:/go/src/github.com/onosproject/onos-e2t \
71+
-v `pwd`/../onos-lib-go/api/asn1:/go/src/github.com/onosproject/onos-e2t/api/asn1 \
72+
-w /go/src/github.com/onosproject/onos-e2t/api \
73+
bufbuild/buf:$BUF_VERSION lint --path e2ap
74+
75+
license-check:
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v4
79+
- name: reuse lint
80+
uses: fsfe/reuse-action@v2
81+
82+
fossa-check:
83+
runs-on: ubuntu-latest
84+
steps:
85+
- uses: actions/checkout@v4
86+
- name: FOSSA scan
87+
uses: fossa-contrib/fossa-action@v3
88+
with:
89+
fossa-api-key: 6d304c09a3ec097ba4517724e4a4d17d

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
linters:
66
enable:
77
- gofmt
8-
- revive
8+
# - revive
99
- misspell
1010
- typecheck
1111
- errcheck

0 commit comments

Comments
 (0)