Merge pull request #2 from thedadams/add-ci #1
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: test | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- README.md | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- README.md | |
jobs: | |
test-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-go@v5 | |
with: | |
cache: false | |
go-version: "1.22" | |
- name: Validate | |
run: make validate | |
- name: Install gptscript | |
run: | | |
curl https://get.gptscript.ai/releases/default_linux_amd64_v1/gptscript -o gptscript | |
chmod +x gptscript | |
- name: Run Tests | |
env: | |
GPTSCRIPT_BIN: ./gptscript | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: make test | |
test-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-go@v5 | |
with: | |
cache: false | |
go-version: "1.22" | |
- name: Install gptscript | |
run: | | |
curl https://get.gptscript.ai/releases/default_windows_amd64_v1/gptscript.exe -o gptscript.exe | |
- name: Run Tests | |
env: | |
GPTSCRIPT_BIN: .\gptscript.exe | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: make test |