This enables all slash commands to also work on PRs created from forks. This will not run CI on PRs coming from a fork. There are unfortunately some limitations around injecting secrets in pull_request actions, which I described in detail in this comment. I've done most of the testing for this in https://github.com/timroes/github-actions-test to test out that the context are set the way I'd expect them. There's one risk: if any of the actual build scripts called by one of the slash commands would use this repository hard-coded they might fail. I've tried to search through the whole code base and don't believe this is the case.
60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
name: performance-test
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
repo:
|
|
description: "Repo to check out code from. Defaults to the main airbyte repo. Set this when building connectors from forked repos."
|
|
required: false
|
|
default: "airbytehq/airbyte"
|
|
gitref:
|
|
description: "The git ref to check out from the specified repository."
|
|
required: false
|
|
default: master
|
|
test-name:
|
|
description: "Test to run classname"
|
|
required: true
|
|
|
|
jobs:
|
|
single-test-runner:
|
|
timeout-minutes: 300
|
|
needs: start-platform-build-runner # required to start the main job when the runner is ready
|
|
runs-on: ${{ needs.start-platform-build-runner.outputs.label }} # run the job on the newly created runner
|
|
environment: more-secrets
|
|
steps:
|
|
- name: Checkout Airbyte
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: ${{ github.event.inputs.repo }}
|
|
ref: ${{ github.event.inputs.gitref }}
|
|
|
|
- name: Npm Caching
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.npm
|
|
key: ${{ secrets.CACHE_VERSION }}-npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ secrets.CACHE_VERSION }}-npm-${{ runner.os }}-
|
|
|
|
# this intentionally does not use restore-keys so we don't mess with gradle caching
|
|
- name: Gradle Caching
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
**/.venv
|
|
key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
- uses: actions/setup-java@v1
|
|
with:
|
|
java-version: '14'
|
|
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '16.13.0'
|
|
|
|
- name: Build
|
|
id: run-specific-test
|
|
run: ./gradlew allTest --tests *${{ github.event.inputs.test-name }}
|