-
Notifications
You must be signed in to change notification settings - Fork 148
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
Showing
761 changed files
with
74,473 additions
and
26,015 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 |
---|---|---|
|
@@ -15,15 +15,14 @@ jobs: | |
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.19.x | ||
go-version: 1.21.x | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ github.job }}-${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ github.job }}-${{ runner.os }}-go-build- | ||
- name: Build | ||
run: go build -v ./... | ||
test: | ||
|
@@ -33,15 +32,14 @@ jobs: | |
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.19.x | ||
go-version: 1.21.x | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ github.job }}-${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ github.job }}-${{ runner.os }}-go-build- | ||
# Dependency for Go module github.com/google/gopacket | ||
- name: Install libpcap-dev | ||
run: sudo apt-get -y install libpcap-dev | ||
|
@@ -50,26 +48,33 @@ jobs: | |
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: profile.cov | ||
|
||
static_analysis: | ||
name: Static Analysis | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.19' | ||
go-version: '1.21' | ||
# Go & staticcheck build cache require a lot of disk space. Reclaim extra | ||
# space for the container by removing unnecessary tooling. | ||
- name: Free additional disk space | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /usr/local/lib/android | ||
sudo rm -rf /opt/hostedtoolcache/CodeQL | ||
sudo mv "${HOME}/.cache" /mnt/cache | ||
ln -s /mnt/cache "${HOME}/.cache" | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
~/.cache/staticcheck | ||
key: ${{ github.job }}-${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ github.job }}-${{ runner.os }}-go-build- | ||
# Dependency for Go module github.com/google/gopacket | ||
- name: Install libpcap-dev | ||
run: sudo apt-get -y install libpcap-dev | ||
|
@@ -93,11 +98,13 @@ jobs: | |
# | ||
# goimports does not support "gofmt -s" so both goimports and gofmt are | ||
# required. | ||
if goimports -d . | grep '^'; then | ||
exit 1 | ||
fi | ||
find . -name "*.go" | egrep -v "pb.go$" | while read l; do | ||
if goimports -d $l | grep '^'; then | ||
exit 1; | ||
fi; | ||
done | ||
- name: Get revive | ||
run: go install github.com/mgechev/revive@latest | ||
run: go install github.com/mgechev/revive@v1.3.4 | ||
- name: Run revive | ||
run: revive ./... | ||
- name: Get staticcheck | ||
|
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,41 @@ | ||
name: NOSImage validation script | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
schedule: | ||
- cron: "49 0 * * *" | ||
|
||
jobs: | ||
integration-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: stable | ||
cache: false | ||
- name: Generate Examples and Check No Diff | ||
run: | | ||
cd tools/nosimage | ||
go run example/generate_example.go -file-path example/example_nosimageprofile.textproto | ||
go run example/generate_example.go -file-path example/example_nosimageprofile_invalid.textproto -invalid | ||
git diff --exit-code --ignore-all-space --ignore-blank-lines | ||
- name: Validate Good Example | ||
run: | | ||
cd tools/nosimage | ||
go run validate/validate.go -file example/example_nosimageprofile.textproto; rm -rf tmp | ||
- name: Validate Bad Example | ||
run: | | ||
cd tools/nosimage | ||
if go run validate/validate.go -file example/example_nosimageprofile_invalid.textproto; then | ||
echo "Validation passed, but failure expected" | ||
exit 1 | ||
fi | ||
rm -rf tmp |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: README OpenConfig Path and RPC Coverage | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
schedule: | ||
- cron: "49 0 * * *" | ||
|
||
jobs: | ||
integration-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: stable | ||
cache: false | ||
|
||
- name: Validate Validation Script | ||
run: | | ||
cd tools/validate_readme_spec | ||
./validate_readme_spec_test.sh | ||
- name: Validate Template README | ||
run: | | ||
go install ./tools/validate_readme_spec | ||
validate_readme_spec -alsologtostderr doc/test-requirements-template.md | ||
- name: Validate Test READMEs | ||
run: | | ||
go install ./tools/validate_readme_spec | ||
# TODO: Remove -feature-dir argument after all READMEs have converted to the new format. | ||
validate_readme_spec -alsologtostderr -feature-dir feature/bgp/policybase/otg_tests/import_export_multi |
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 |
---|---|---|
|
@@ -20,15 +20,14 @@ jobs: | |
- name: Set up Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.19.x | ||
go-version: 1.21.x | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ github.job }}-${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ github.job }}-${{ runner.os }}-go-build- | ||
- name: Build Wiki | ||
run: | | ||
pushd featureprofiles.wiki | ||
|
Oops, something went wrong.