Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/beautifulsoup4-4.12.3
Browse files Browse the repository at this point in the history
  • Loading branch information
zivnevo committed Jun 10, 2024
2 parents 06adf15 + a4abf4d commit 034b173
Show file tree
Hide file tree
Showing 311 changed files with 4,358 additions and 11,056 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-nca-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 'Checks out NCA, then installs the required dependencies'
runs:
using: "composite"
steps:
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: 3.9
architecture: x64
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@012739e5082ff0c22ca6d6ab32e07c36df03c4a4
uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -44,4 +44,4 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@012739e5082ff0c22ca6d6ab32e07c36df03c4a4
uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
8 changes: 4 additions & 4 deletions .github/workflows/make-github-and-docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29

- name: Setup NCA environment
uses: ./.github/actions/setup-nca-env
Expand All @@ -38,14 +38,14 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25
with:
context: .
push: true
tags: ghcr.io/ibm/nca:${{ env.version }}

- name: Build and push ubi-based Docker image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25
with:
context: .
file: Dockerfile.ubi
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
python -m build
- name: Push version to PyPi
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/reset-tests-expected-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./.github/actions/setup-nca-env
- uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
- uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe
with:
workflow: test-push.yml
workflow_conclusion: completed
name: k8s-log
path: tests/
- uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
- uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe
with:
workflow: test-push.yml
workflow_conclusion: completed
name: calico-log
path: tests/
- uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
- uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe
with:
workflow: test-push.yml
workflow_conclusion: completed
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
persist-credentials: false

Expand All @@ -39,14 +39,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@012739e5082ff0c22ca6d6ab32e07c36df03c4a4
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
with:
sarif_file: results.sarif
97 changes: 22 additions & 75 deletions .github/workflows/test-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
test-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- name: Build Docker image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25
id: build_docker
with:
context: .
Expand All @@ -27,9 +27,9 @@ jobs:
test-docker-ubi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- name: Build Docker image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25
id: build_docker
with:
context: .
Expand All @@ -40,7 +40,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./.github/actions/setup-nca-env
- run: pip install flake8
- name: Lint with flake8
Expand All @@ -54,15 +54,15 @@ jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./.github/actions/setup-nca-env
- run: |
export PYTHONPATH=.
python tests/run_unittests.py
k8s-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./.github/actions/setup-nca-env
- name: install helm
run: |
Expand All @@ -76,42 +76,21 @@ jobs:
run: python tests/run_all_tests.py --type=general --category=k8s --check_run_time | tee tests/k8s_log.txt ; test ${PIPESTATUS[0]} -eq 0
- name: upload run_k8s_tests log
if: ${{ always() }}
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: k8s-log
path: tests/k8s_log.txt
- name: Upload k8s failed run-time tests file
if: ${{ always() }}
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: k8s-failed-run-time-check-file
path: ./tests/k8s_tests_failed_runtime_check.csv
if-no-files-found: ignore
k8s-tests-orig-vs-opt-comparison:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: ./.github/actions/setup-nca-env
- name: install helm
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
sudo ./get_helm.sh
- name: Run k8s tests
env:
GHE_TOKEN: ${{ github.token }}
PYTHONPATH: .
run: python tests/run_all_tests.py --type=general --category=k8s --hc_opt=debug | tee tests/k8s_cmp_log.txt ; test ${PIPESTATUS[0]} -eq 0
- name: upload run_k8s_tests log
if: ${{ always() }}
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: k8s-cmp-log
path: tests/k8s_cmp_log.txt
calico-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./.github/actions/setup-nca-env
- name: Run calico tests
env:
Expand All @@ -120,37 +99,21 @@ jobs:
run: python tests/run_all_tests.py --type=general --category=calico --check_run_time | tee tests/calico_log.txt ; test ${PIPESTATUS[0]} -eq 0
- name: upload run_calico_tests log
if: ${{ always() }}
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: calico-log
path: tests/calico_log.txt
- name: Upload calico failed run-time tests file
if: ${{ always() }}
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: calico-failed-run-time-check-file
path: ./tests/calico_tests_failed_runtime_check.csv
if-no-files-found: ignore
calico-tests-orig-vs-opt-comparison:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: ./.github/actions/setup-nca-env
- name: Run calico tests
env:
GHE_TOKEN: ${{ github.token }}
PYTHONPATH: .
run: python tests/run_all_tests.py --type=general --category=calico --hc_opt=debug | tee tests/calico_cmp_log.txt ; test ${PIPESTATUS[0]} -eq 0
- name: upload run_calico_tests log
if: ${{ always() }}
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: calico-cmp-log
path: tests/calico_cmp_log.txt
istio-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./.github/actions/setup-nca-env
- name: Run istio tests
env:
Expand All @@ -159,45 +122,29 @@ jobs:
run: python tests/run_all_tests.py --type=general --category=istio --check_run_time | tee tests/istio_log.txt ; test ${PIPESTATUS[0]} -eq 0
- name: upload run_istio_tests log
if: ${{ always() }}
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: istio-log
path: tests/istio_log.txt
- name: Upload istio failed run-time tests file
if: ${{ always() }}
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: istio-failed-run-time-check-file
path: ./tests/istio_tests_failed_runtime_check.csv
if-no-files-found: ignore
istio-tests-orig-vs-opt-comparison:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: ./.github/actions/setup-nca-env
- name: Run istio tests
env:
GHE_TOKEN: ${{ github.token }}
PYTHONPATH: .
run: python tests/run_all_tests.py --type=general --category=istio --hc_opt=debug | tee tests/istio_cmp_log.txt ; test ${PIPESTATUS[0]} -eq 0
- name: upload run_istio_tests log
if: ${{ always() }}
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
with:
name: istio-cmp-log
path: tests/istio_cmp_log.txt
fw-rules-assertion-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./.github/actions/setup-nca-env
- run: |
export PYTHONPATH=.
python tests/run_all_tests.py --type=fw_rules_assertions
# live-cluster:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
# - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
# - uses: ./.github/actions/setup-nca-env
# - uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00
# - run: |
Expand All @@ -211,30 +158,30 @@ jobs:
build_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./.github/actions/setup-nca-env
- name: Build package
run: |
pip install build==0.10.0
python -m build
- uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: nca-package
path: dist/*
test_package:
runs-on: ubuntu-latest
needs: build_package
steps:
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: 3.9
architecture: x64
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427
with:
name: nca-package
path: nca_build
- run: |
pip install nca_build/network-config-analyzer-*.tar.gz
pip install nca_build/network_config_analyzer-*.tar.gz
nca --connectivity -r https://github.com/IBM/network-config-analyzer/blob/master/tests/livesim_tests/livesim_topology.yaml
env:
GHE_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .github/workflows/update-tests-expected-output.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./.github/actions/setup-nca-env
- name: update or add expected output files
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/update-tests-expected-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
outputs:
changed_tests: ${{ steps.changes.outputs.changed_tests}}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
fetch-depth: 0
- uses: ./.github/actions/setup-nca-env
Expand All @@ -28,21 +28,21 @@ jobs:
needs: changed-tests
if: ${{needs.changed-tests.outputs.changed_tests}}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./.github/actions/setup-nca-env
- uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
- uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe
with:
workflow: test-push.yml
workflow_conclusion: completed
name: k8s-log
path: tests/
- uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
- uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe
with:
workflow: test-push.yml
workflow_conclusion: completed
name: calico-log
path: tests/
- uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
- uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe
with:
workflow: test-push.yml
workflow_conclusion: completed
Expand Down
Loading

0 comments on commit 034b173

Please sign in to comment.