Skip to content

Patch 2

Patch 2 #21

Workflow file for this run

name: Sanity Test
on:
pull_request_target:
types: [opened, synchronize, reopened, labeled]
merge_group:
types: [checks_requested]
jobs:
check-org-membership:
runs-on: ubuntu-latest
steps:
- name: Check if PR author is a member of the organization
id: org-check
continue-on-error: true
run: |
ORG="psturc-org"
AUTHOR="${{ github.event.pull_request.user.login }}"
MEMBERSHIP=$(gh api -H "Accept: application/vnd.github.v3+json" /orgs/$ORG/memberships/$AUTHOR -q .state)
if [[ "$MEMBERSHIP" == "active" ]]; then
echo "ORG_MEMBER=true" >> $GITHUB_ENV
exit 0
else
exit 1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
sanity-test:
if: ${{ (github.event.pull_request.user.login == 'renovate[bot]') || contains(github.event.pull_request.labels.*.name, 'ok-to-test') || (needs.check-org-membership.result == 'success') }}
needs: check-org-membership
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: 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: 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