8000 test: scan with --test-scanner by psturc · Pull Request #3 · psturc/ec-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

test: scan with --test-scanner #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 40 additions & 31 deletions .github/workflows/checks-sealights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
echo "[Sealights] Configuring SeaLights to scan the pull request branch"
echo "Latest commit sha: ${LATEST_COMMIT_SHA}"
echo "PR Number: ${PULL_REQUEST_NUMBER}"
./slcli config create-pr-bsid --app ec-cli --target-branch "main" --pull-request-number ${PULL_REQUEST_NUMBER} --latest-commit ${LATEST_COMMIT_SHA} --repository-url https://github.com/enterprise-contract/ec-cli.git
./slcli config create-pr-bsid --app nodejs-test --target-branch "ec-cli" --pull-request-number ${PULL_REQUEST_NUMBER} --latest-commit ${LATEST_COMMIT_SHA} --repository-url https://github.com/enterprise-contract/ec-cli.git
env:
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
LATEST_COMMIT_SHA: ${{github.event.pull_request.head.sha}}
Expand All @@ -110,7 +110,7 @@ jobs:
if: env.on-event == 'push'
run: |
echo "[Sealights] Configuring SeaLights to scan the main branch after pull request was closed"
./slcli config create-bsid --app ec-cli --branch main --build ${LATEST_COMMIT_SHA}
./slcli config create-bsid --app nodejs-test --branch ec-cli --build ${LATEST_COMMIT_SHA}
env:
LATEST_COMMIT_SHA: ${{ github.sha }}

Expand All @@ -131,35 +131,37 @@ jobs:
path: ${{ github.workspace }}
key: workspace-${{ github.run_id }}

Test:
runs-on: ubuntu-latest
needs: Initialize
steps:
- name: Restore workspace
uses: actions/cache@v4
with:
path: ${{ github.workspace }}
key: workspace-${{ github.run_id }}
# Test:
# runs-on: ubuntu-latest
# needs: Initialize
# steps:
# - name: Restore workspace
# uses: actions/cache@v4
# with:
# path: ${{ github.workspace }}
# key: workspace-${{ github.run_id }}

- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
disable-telemetry: true
# - name: Harden Runner
# uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
# with:
# egress-policy: audit
# disable-telemetry: true

- name: Generate
run: make generate
# - name: Generate
# run: make generate

- name: Test
run: make test
# - name: Test
# run: make test

Acceptance:
runs-on: ubuntu-latest
needs: [Initialize, Test]
needs: [Initialize]
env:
BSID: ${{ needs.Initialize.outputs.bsid }}
SEALIGHTS_LOG_LEVEL: none
SEALIGHTS_LOG_LEVEL: debug
SEALIGHTS_CONNECTION_TIMEOUT: 120s
SEALIGHTS_LAB_ID: "EC-CLI_Acceptance_Tests_${{ github.repository_owner }}_${{ github.event.number }}"
SEALIGHTS_TEST_STAGE: "Acceptance Tests"
steps:
- name: Restore workspace
uses: actions/cache@v4
Expand All @@ -170,15 +172,22 @@ jobs:
- name: Update podman
run: |
"${GITHUB_WORKSPACE}/hack/ubuntu-podman-update.sh"
- name: Create a test session
run: ./slcli test start-stage --bsid=$BSID --testStage "Acceptance Tests"
# - name: Create a test session
# run: ./slcli test start-stage --bsid=$BSID --testStage "Acceptance Tests"

- name: Acceptance test
run: make acceptance-sealights
- name: Second scan
run: |
./slcli scan --tests-runner --workspacepath "acceptance" --path-to-scanner ./slgoagent --scm git

- name: Upload test results, end test session
if: success() || failure()
- name: Acceptance test
env:
SEALIGHTS_LOG_LEVEL: none
run: |
cat ./junit-acceptance.xml
./slcli test upload-reports --bsid=$BSID --report-location ./junit-acceptance.xml
./slcli test end-stage --bsid=$BSID --executionId "Acceptance Tests"
make acceptance-sealights

# - name: Upload test results, end test session
# if: success() || failure()
# run: |
# cat ./junit-acceptance.xml
# ./slcli test upload-reports --bsid=$BSID --report-location ./junit-acceptance.xml
# ./slcli test end-stage --bsid=$BSID --executionId "Acceptance Tests"
Loading
0