-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Juan Hernandez <[email protected]>
- Loading branch information
Showing
32 changed files
with
1,390 additions
and
413 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 |
---|---|---|
|
@@ -2,6 +2,9 @@ | |
!/LICENSE.txt | ||
!/Makefile | ||
!/README.md | ||
!/dev.py | ||
!/dev.txt | ||
!/dev/ | ||
!/go.mod | ||
!/go.sum | ||
!/internal | ||
|
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,37 @@ | ||
# | ||
# Copyright (c) 2023 Red Hat, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
# in compliance with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations under | ||
# the License. | ||
# | ||
|
||
name: Install tools | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.11' | ||
cache: pip | ||
cache-dependency-path: dev.txt | ||
|
||
- name: Install Python modules | ||
shell: bash | ||
run: pip install -r dev.txt | ||
|
||
- name: Install tools | ||
shell: bash | ||
run: ./dev.py setup |
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 |
---|---|---|
|
@@ -28,8 +28,11 @@ jobs: | |
- name: Checkout the source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install tools | ||
uses: ./.github/actions/install-tools | ||
|
||
- name: Build image | ||
run: make image | ||
run: ./dev.py build image | ||
|
||
unit-tests: | ||
name: Unit tests | ||
|
@@ -38,25 +41,14 @@ jobs: | |
- name: Checkout the source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Install Go tools | ||
run: | | ||
go install github.com/onsi/ginkgo/v2/ginkgo@$(go list -f '{{.Version}}' -m github.com/onsi/ginkgo/v2) | ||
go install go.uber.org/mock/[email protected] | ||
- name: Install tools | ||
uses: ./.github/actions/install-tools | ||
|
||
- name: Install spectral | ||
run: | | ||
curl -Lo spectral https://github.com/stoplightio/spectral/releases/download/v6.11.0/spectral-linux-x64 | ||
echo 0e151d3dc5729750805428f79a152fa01dd4c203f1d9685ef19f4fd4696fcd5f spectral | sha256sum -c | ||
chmod +x spectral | ||
sudo mv spectral /usr/bin | ||
- name: Install tools | ||
run: ./dev.py setup | ||
|
||
- name: Run the tests | ||
run: make tests | ||
run: ./dev.py test | ||
|
||
check-generated-code: | ||
name: Check generated code | ||
|
@@ -65,17 +57,11 @@ jobs: | |
- name: Checkout the source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Install Go tools | ||
run: | | ||
go install go.uber.org/mock/[email protected] | ||
- name: Install tools | ||
uses: ./.github/actions/install-tools | ||
|
||
- name: Generate code | ||
run: make generate | ||
run: ./dev.py generate | ||
|
||
- name: Check differences | ||
run: git diff --exit-code | ||
|
@@ -87,13 +73,8 @@ jobs: | |
- name: Checkout the source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
- name: Install tools | ||
uses: ./.github/actions/install-tools | ||
|
||
- name: Run the linter | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.54.2 | ||
args: --timeout=5m | ||
run: ./dev.py lint |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
*.log | ||
*.pyc | ||
/__debug* | ||
/bin/* | ||
/oran-o2ims | ||
/vendor | ||
/bin/* | ||
__pycache__ |
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.