Skip to content

Commit

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

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Update master.yml

* Create .golangci.yml

* GHA-integration commit

* Updates to GHA

* adderess issue with lint

* Testing lint

* Reverted back

---------

Co-authored-by: gab-arrobo <[email protected]>
  • Loading branch information
Agarwal-Shivansh and gab-arrobo authored May 21, 2024
1 parent 2377f12 commit 332b8aa
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Intel Corporation

version: 2
updates:

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

- package-ecosystem: "gomod"
directory: "/go"
schedule:
interval: "weekly"
63 changes: 63 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# 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
defaults:
run:
working-directory: ./go
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: './go/go.mod'
- name: Build
run: go build ./...

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: './go/go.mod'
- uses: golangci/golangci-lint-action@v6
with:
version: latest
args: -v --config .golangci.yml --timeout=15m

unit-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./go
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: './go/go.mod'
- name: Unit tests
run: go test -race github.com/onosproject/onos-api/go/...

license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: reuse lint
uses: fsfe/reuse-action@v3

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
24 changes: 24 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Intel Corporation

linters:
enable:
- gofmt
- revive
- misspell
- typecheck
- errcheck
- dogsled
- unconvert
- nakedret
- exportloopref
run:
skip-dirs:
- modelplugin

issues:
exclude:
- Error return value of `.*Close` is not checked
- Error return value of `.*Flush` is not checked
- Error return value of `.*Write` is not checked
- Error return value of `.*Stop` is not checked

0 comments on commit 332b8aa

Please sign in to comment.