Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gha integration #47

Merged
merged 10 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Intel Corporation

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "docker"
directory: "build/onos-mlb"
schedule:
interval: "weekly"

- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
75 changes: 75 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# 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: |
GOPRIVATE="github.com/onosproject/*" go build -o build/_output/onos-mlb ./cmd/onos-mlb
Agarwal-Shivansh marked this conversation as resolved.
Show resolved Hide resolved

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: golangci/golangci-lint-action@v3.7.0
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-mlb/pkg/...
go test -race github.com/onosproject/onos-mlb/cmd/...

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-mlb/Dockerfile -t onosproject/onos-mlb:latest
rm -rf vendor
gab-arrobo marked this conversation as resolved.
Show resolved Hide resolved

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: 9dc8fa92e3dd565687317beb87b56d89
Agarwal-Shivansh marked this conversation as resolved.
Show resolved Hide resolved