Skip to content

Fork PR Integration Testing #4

Fork PR Integration Testing

Fork PR Integration Testing #4

name: Fork PR Integration Testing
on:
workflow_dispatch:
inputs:
pr_number:
description: PR Number to Test
required: true
env:
LOW_PRIV_PAT: ${{ secrets.LOW_PRIV_PAT }}
ORG_MEMBER_REPO_TOKEN: ${{ secrets.ORG_MEMBER_REPO_TOKEN }}
ORG_MEMBER_REPO_WORKFLOW_TOKEN: ${{ secrets.ORG_MEMBER_REPO_WORKFLOW_TOKEN }}
ORG_MEMBER_REPO_WORKFLOW_ADMIN_TOKEN: ${{ secrets.ORG_MEMBER_REPO_WORKFLOW_ADMIN_TOKEN }}
ORG_ADMIN_REPO_TOKEN: ${{ secrets.ORG_ADMIN_REPO_TOKEN }}
ORG_ADMIN_REPO_WORKFLOW_TOKEN: ${{ secrets.ORG_ADMIN_REPO_WORKFLOW_TOKEN }}
ORG_ADMIN_REPO_WORKFLOW_ADMIN_TOKEN: ${{ secrets.ORG_ADMIN_REPO_WORKFLOW_ADMIN_TOKEN }}
ORG_ADMIN_REPO_WORKFLOW_ADMIN_DELETE_TOKEN: ${{ secrets.ORG_ADMIN_REPO_WORKFLOW_ADMIN_DELETE_TOKEN }}
WF_DISPATCH_TOKEN: ${{ secrets.WF_DISPATCH_TOKEN }}
RUN_REF: ${{ github.ref }}
jobs:
SH-Runner-Dispatch:
if: contains(FromJSON('["AdnaneKhan", "mas0nd", "DS-KoolAid"]'), github.actor)
name: Prepare Integration Test SH Runner
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.11
- run: pip install requests
- name: Dispatch Runner Event
run: python test/runner_helper.py dispatch
Integration-Testing:
name: Gato Integration Testing
needs: SH-Runner-Dispatch
if: success()
strategy:
max-parallel: 1
matrix:
os: [macos-latest, ubuntu-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
env:
PR_NUMBER: ${{ inputs.pr_number }}
GH_TOKEN: ${{ github.token }}
timeout-minutes: 10
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Checkout PR
run: gh pr checkout $PR_NUMBER
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: |
python -m pip install --upgrade pip
pip install ".[test]"
- name: Kick off integration tests.
run: |
pytest test/