-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f01eb9b
commit c07114b
Showing
12 changed files
with
152 additions
and
257 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,123 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2023 Canonical Ltd. | ||
# Copyright 2024 Intel Corporation | ||
|
||
name: Master workflow | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: latest | ||
args: -v --config ./.golangci.yml | ||
|
||
check-spelling: | ||
name: Markdown spellcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check Spelling | ||
uses: rojopolis/[email protected] | ||
with: | ||
config_path: .spellcheck.yml | ||
task_name: Markdown | ||
|
||
route-control-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Create virtual environment | ||
run: python -m venv venv | ||
|
||
- name: Install dependencies | ||
run: | | ||
source ./venv/bin/activate | ||
pip install -r requirements.txt | ||
- name: Run tests | ||
run: | | ||
source ./venv/bin/activate | ||
python -m unittest ./conf/test_route_control.py | ||
- name: Clean up virtual environment | ||
run: rm -rf venv | ||
|
||
unit-tests-pfcp: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Run unit tests for PFCP Agent | ||
run: make test | ||
|
||
integration-tests-up4: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Run integration tests for PFCP Agent & UP4 | ||
run: make test-up4-integration-docker || (docker logs pfcpiface; exit 1) | ||
|
||
integration-tests-bess: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Run integration tests for PFCP Agent & UP4 | ||
run: make test-bess-integration-native | ||
|
||
license-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: reuse lint | ||
uses: fsfe/reuse-action@v1 | ||
|
||
fossa-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: FOSSA scan | ||
uses: fossa-contrib/fossa-action@v3 | ||
with: | ||
fossa-api-key: 0c3bbcdf20e157bbd487dae173751b28 |
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 |
---|---|---|
|
@@ -18,38 +18,30 @@ jobs: | |
VERSION: "PR-${{ github.event.pull_request.number }}" | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout and build | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Generate protobuf | ||
run: | | ||
make pb | ||
run: make pb | ||
|
||
- name: Build the BESS-UPF Docker image | ||
run: | | ||
DOCKER_TARGETS=bess make docker-build | ||
run: DOCKER_TARGETS=bess make docker-build | ||
|
||
- name: Build the PFCP Agent Docker image | ||
run: | | ||
DOCKER_TARGETS=pfcpiface make docker-build | ||
run: DOCKER_TARGETS=pfcpiface make docker-build | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
# Format the code | ||
- name: Shell Format | ||
# https://github.com/mvdan/sh/issues/288 | ||
run: | | ||
wget -qO shfmt https://github.com/mvdan/sh/releases/download/v3.1.1/shfmt_v3.1.1_linux_amd64 | ||
chmod +x shfmt && sudo mv shfmt /bin | ||
# https://github.com/mvdan/sh/issues/288 | ||
shfmt -l -w $(shfmt -f . | grep -v vendor/) | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Go Format | ||
run: | | ||
make fmt | ||
run: make fmt | ||
|
||
- name: Python format | ||
run: | | ||
|
@@ -58,8 +50,7 @@ jobs: | |
isort . | ||
- name: Show all CI changes | ||
run: | | ||
git --no-pager diff | ||
run: git --no-pager diff | ||
|
||
# Verify P4 constants | ||
- name: Build P4 constants | ||
|
@@ -72,25 +63,21 @@ jobs: | |
if: ${{ steps.check.outputs.PORCELAIN != '' }} | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
core.setFailed('Please run make p4-constants and commit changes') | ||
script: core.setFailed('Please run make p4-constants and commit changes') | ||
|
||
# Build again and commit | ||
- name: Build the BESS-UPF Docker image (after format) | ||
run: | | ||
DOCKER_TARGETS=bess make docker-build | ||
run: DOCKER_TARGETS=bess make docker-build | ||
|
||
- name: Build the PFCP Agent Docker image (after format) | ||
run: | | ||
DOCKER_TARGETS=pfcpiface make docker-build | ||
run: DOCKER_TARGETS=pfcpiface 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 | ||
# 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" | ||
|
@@ -106,5 +93,4 @@ jobs: | |
|
||
- name: Push Docker image | ||
if: steps.docker-login.conclusion == 'success' | ||
run: | | ||
make docker-push | ||
run: make docker-push |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.