Skip to content

chore(deps): update https://github.com/konflux-ci/integration-service digest to 2b7ee9a #61

chore(deps): update https://github.com/konflux-ci/integration-service digest to 2b7ee9a

chore(deps): update https://github.com/konflux-ci/integration-service digest to 2b7ee9a #61

Workflow file for this run

name: Sanity Test
on:
pull_request_target:
types: [opened, synchronize, reopened, labeled]
merge_group:
types: [checks_requested]
jobs:
check-prerequisites:
runs-on: ubuntu-latest
steps:
- run: |
WHITELISTED_BOT_NAME="renovate[bot]"
REQUIRED_LABEL_NAME="ok-to-test"
ORG="${{ github.repository_owner }}"
PR_AUTHOR=$(jq --raw-output .pull_request.user.login $GITHUB_EVENT_PATH)
PR_LABELS=$(jq --raw-output .pull_request.labels[].name $GITHUB_EVENT_PATH)
if [ "$PR_AUTHOR" == "$WHITELISTED_BOT_NAME" ]; then
echo "PR author is "$WHITELISTED_BOT_NAME", skipping further checks."
exit 0
fi
if [[ "$PR_LABELS" == *$REQUIRED_LABEL_NAME* ]]; then
echo "PR has '$REQUIRED_LABEL_NAME' label, skipping further checks."
exit 0
fi
if gh api "/orgs/$ORG/members/$PR_AUTHOR"; then
echo "PR author is a member of $ORG GitHub organization, skipping further checks"
exit 0
fi
ERROR_SUMMARY=$(cat <<EOF
### ❌ Cannot run Sanity test - at least one of the following conditions must be met:
* PR author is '$WHITELISTED_BOT_NAME'
* PR has label '$REQUIRED_LABEL_NAME'
* PR author is a public member of '$ORG' GitHub organization
EOF
)
echo "$ERROR_SUMMARY" >> $GITHUB_STEP_SUMMARY
echo "$ERROR_SUMMARY"
exit 1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
sanity-test:
needs: check-prerequisites
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
docker-images: false
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: "${{ github.event.pull_request.head.sha }}"
- name: Disable AppArmor
# works around a change in ubuntu 24.04 that restricts Linux namespace access
# for unprivileged users
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1
with:
config: kind-config.yaml
- name: Show version information
run: |
kubectl version
kind version
- name: List namespaces
run: |
kubectl get namespace
- name: Deploying Dependencies
run: |
./deploy-deps.sh
- name: List namespaces
run: |
kubectl get namespace
- name: Wait for the dependencies to be ready
run: |
./wait-for-all.sh
- name: WORKAROUND - Set up tkn cli for the following task
uses: tektoncd/actions/setup-tektoncd-cli@main
with:
version: latest
- name: WORKAROUND - Remove clair-scan task from docker-pipeline
run: |
./test/e2e/customize-docker-pipeline.sh
- name: Deploying Konflux
run: |
./deploy-konflux.sh
- name: List namespaces
run: |
kubectl get namespace
- name: Deploy test resources
run: |
./deploy-test-resources.sh
- name: Run Go Tests
run: |
go test ./test/go-tests/
- name: Prepare resources for E2E tests
env:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_WEBHOOK_SECRET: ${{ secrets.APP_WEBHOOK_SECRET }}
QUAY_ORG: ${{ secrets.QUAY_ORG }}
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
SMEE_CHANNEL: ${{ secrets.SMEE_CHANNEL }}
run: |
./test/e2e/prepare-e2e.sh
- name: Run E2E tests
env:
GH_ORG: ${{ secrets.GH_ORG }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
QUAY_DOCKERCONFIGJSON: ${{ secrets.QUAY_DOCKERCONFIGJSON }}
run: |
./test/e2e/run-e2e.sh
- name: Generate error logs
if: ${{ !cancelled() }}
run: |
./generate-err-logs.sh
- name: Archive logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: logs
path: logs