Skip to content

Commit

Permalink
New GHA e2e test functionality (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eldarrin committed Jun 19, 2023
1 parent 476df5e commit bf9db88
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
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)

0 comments on commit bf9db88

Please sign in to comment.