-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated util version * metric function changes * updated util version (#87) * 1. Lint error fixes 2. Added github actions 3. fixed UT failure cases 4. Mocked DRSM object for fixing of UT failures Co-authored-by: Ankur Upadhyaya <[email protected]>
- Loading branch information
1 parent
a4759db
commit 3b7558f
Showing
22 changed files
with
332 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 Intel Corporation | ||
|
||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 Intel Corporation | ||
name: Docker image | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout and build | ||
- uses: actions/checkout@v3 | ||
- name: Build and push Docker image | ||
run: | | ||
make docker-build | ||
# push-dockerhub: | ||
# env: | ||
# DOCKER_REGISTRY: "docker.io/" | ||
# DOCKER_REPOSITORY: "badhrinathpa/" | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# | ||
# - run: echo GIT_SHA_SHORT=$(git rev-parse --short HEAD) >> $GITHUB_ENV | ||
# | ||
# - id: docker-login | ||
# uses: docker/[email protected] | ||
# with: | ||
# registry: docker.io | ||
# username: ${{ secrets.DOCKER_HUB_LOGIN }} | ||
# password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
# | ||
# - name: Build and push "master-latest" Docker images | ||
# env: | ||
# DOCKER_TAG: master-${{ env.GIT_SHA_SHORT } | ||
# run: | | ||
# make docker-build | ||
# make docker-push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 Intel Corporation | ||
name: golangci-lint | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- master | ||
pull_request: | ||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: latest | ||
args: -v --config ./.golangci.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 Intel Corporation | ||
name: Pull Request | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.event.pull_request.number }} | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout and build | ||
- uses: actions/checkout@v3 | ||
- name: Build Docker image | ||
run: | | ||
make docker-build | ||
# Format the code | ||
- name: Go Format | ||
run: | | ||
make fmt | ||
- name: Show all CI changes | ||
run: | | ||
git --no-pager diff | ||
# Build again and commit | ||
- name: Build Docker image after format | ||
run: | | ||
make docker-build | ||
- name: Update PR with changes | ||
uses: gr2m/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
body: | | ||
Updated with changes from CI | ||
branch: ${{ github.event.pull_request.head.ref }} | ||
author: "Github Actions <actions@github>" | ||
commit-message: "Actions: Updated with changes from CI" | ||
# - name: Run AIAB | ||
# run: | | ||
# sudo apt-get update | ||
# sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 | ||
# sudo chmod a+x /usr/local/bin/yq | ||
# make docker-build | ||
# make run-aiab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 Intel Corporation | ||
--- | ||
name: REUSE | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
license-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: reuse lint | ||
run: make check-reuse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 Intel Corporation | ||
|
||
name: Unit tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
unit-test-amf: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
|
||
- name: Run unit tests for AMF | ||
run: | | ||
make test | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
FROM golang:1.16.0-stretch AS builder | ||
FROM golang:1.18.3-stretch AS builder | ||
|
||
LABEL maintainer="ONF <[email protected]>" | ||
|
||
|
@@ -23,7 +23,7 @@ COPY . $GOPATH/src/amf | |
RUN cd $GOPATH/src/amf \ | ||
&& make all | ||
|
||
FROM alpine:3.8 as amf | ||
FROM alpine:3.17 as amf | ||
|
||
LABEL description="ONF open source 5G Core Network" \ | ||
version="Stage 3" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.