-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
49 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
name: Test PR | ||
on: | ||
pull_request_target: | ||
branches: | ||
- main | ||
jobs: | ||
approve: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Approve | ||
run: echo For security reasons, all pull requests need to be approved first before running any automated CI. | ||
|
||
test-branch: | ||
if: github.ref != 'refs/heads/main' | ||
name: run-tests | ||
runs-on: ubuntu-latest | ||
needs: [approve] | ||
environment: OPENAI | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
ANYSCALE_API_KEY: ${{ secrets.ANYSCALE_API_KEY }} | ||
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 2 | ||
|
||
- name: Setup bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Install Dependencies | ||
run: bun i | ||
|
||
- run: bun run type-check | ||
- run: bun run lint | ||
- run: bun test --timeout=25000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters