Skip to content

Commit

Permalink
GHA-integration commit (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
Agarwal-Shivansh authored May 12, 2024
1 parent bc07277 commit cae25e8
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/depandabot.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/aether-roc-api"
schedule:
interval: "weekly"

- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
74 changes: 74 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 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: CGO_ENABLED=1 go build -o build/_output/aether-roc-api ./cmd/aether-roc-api

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 --timeout=15m

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: |
CGO_ENABLED=1 go test -race github.com/onosproject/aether-roc-api/pkg/...
CGO_ENABLED=1 go test -race github.com/onosproject/aether-roc-api/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: |
go mod vendor
docker build . -f build/aether-roc-api/Dockerfile -t onosproject/aether-roc-api:latest
rm -rf vendor
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
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
linters:
enable:
- gofmt
- revive
# - revive
- misspell
- typecheck
- errcheck
- dogsled
- unconvert
- nakedret
# - nakedret
- exportloopref
issues:
exclude-use-default: false
Expand Down

0 comments on commit cae25e8

Please sign in to comment.