Skip to content

Commit

Permalink
Gha integration (#68)
Browse files Browse the repository at this point in the history
* GHA-integration initial commit

* Update action

---------

Co-authored-by: gab-arrobo <gabriel.arrobo@intel.com>
  • Loading branch information
Agarwal-Shivansh and gab-arrobo authored Feb 10, 2024
1 parent e576558 commit 3412c99
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
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-mho"
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: go build -o build/_output/onos-mho ./cmd/onos-mho

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-mho/pkg/...
go test -race github.com/onosproject/onos-mho/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-mho/Dockerfile -t onosproject/onos-mho:latest
rm -rf vendor
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: fossas/fossa-action@main
with:
api-key: ${{secrets.fossaApiKey}}

0 comments on commit 3412c99

Please sign in to comment.