Skip to content
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

New GHA e2e test functionality #127

Merged
merged 1 commit into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
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
17 changes: 17 additions & 0 deletions .github/workflows/test-runner-gha-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test Runner

on:
workflow_dispatch:

env:
TAG: "latest"

jobs:
test:
runs-on: ["self-hosted", "Linux", "x64", "e2e-gha-tester"]

steps:
- name: echoer
run: |
echo I am a thing
echo I have finished being a thing
22 changes: 22 additions & 0 deletions e2e/integrations/github/readme-gha.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# How to implement GitHub e2e GHA Tests for KEDA

Assumes you have already completed readme.MD

## Actions workflows:

You will need to modify the .env file to include the following variables:

.env file is located in the kedacore/tests directory.

- `GH_GHA_WORKFLOW_ID=` This is the workflow id of the workflow to run for scaled gha jobs. (test-runner-gha-job.yaml)
- `GH_APP_ID=` This is the app id of the github app that is used to create the runners.
- `GH_INST_ID=` This is the installation id of the github app that is used to create the runners.
- `GH_APP_KEY=` This is the private key of the github app that is used to create the runners.

### Run this after the test-tools PR is merged to main to get the workflow id for the workflow to run for scaled gha job.
1. `curl https://api.github.com/repos/kedacore/test-tools/actions/workflows`

2. Create a new github app for this repo. You need the app id when you have created it; turn off webhooks when you set it up.
3. Create a private key for the app and save it to a file. You need the private key when you have created it, base64 it and add it to the above env variable
4. Install the app on the repo. You need the installation id when you have installed it (Its in the URL at the top)
5. Permissions - Actions Read Only, Admin Read & Write, Metadata Read Only (in repositories)