chore: update GitHub actions file for upcoming changes #2
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
name: Run Tests | |
on: | |
workflow_call: | |
inputs: | |
git_ref: | |
required: true | |
type: string | |
secrets: | |
OPENAI_API_KEY: | |
required: true | |
jobs: | |
test-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
ref: ${{ inputs.git_ref }} | |
- uses: actions/setup-go@v5 | |
with: | |
cache: false | |
go-version: "1.23" | |
- name: Validate | |
run: make validate | |
- name: Install gptscript | |
run: | | |
curl https://get.gptscript.ai/releases/default_linux_amd64_v1/gptscript -o ./gptscriptexe | |
chmod +x ./gptscriptexe | |
- name: Run Tests | |
env: | |
GPTSCRIPT_BIN: ./gptscriptexe | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
run: make test | |
test-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
ref: ${{ inputs.git_ref }} | |
- uses: actions/setup-go@v5 | |
with: | |
cache: false | |
go-version: "1.23" | |
- name: Install gptscript | |
run: | | |
curl https://get.gptscript.ai/releases/default_windows_amd64_v1/gptscript.exe -o gptscript.exe | |
- name: Create config file | |
- name: Run Tests | |
env: | |
GPTSCRIPT_BIN: .\gptscript.exe | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
run: make test |