Skip to content

Commit

Permalink
Enable integration tests by using secret-based env. variables (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyatt authored Nov 10, 2024
1 parent 8111648 commit 5c17623
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
28 changes: 27 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: [ "*" ]

jobs:
test:
fast-tests:
runs-on: ubuntu-latest
environment: Continuous Integration
strategy:
Expand All @@ -19,6 +19,8 @@ jobs:
- 28.2
- 29.1
- 29.2
- 29.3
- 29.4
steps:
- name: Set up Emacs
uses: jcs090218/setup-emacs@master
Expand All @@ -40,5 +42,29 @@ jobs:
eldev -p -dtT lint
- name: Test the project
# We don't set up the env variables so no integration tests will be run
run: |
eldev -p -dtT test
integration-tests:
runs-on: ubuntu-latest
environment: Continuous Integration
steps:
- name: Set up Emacs
uses: jcs090218/setup-emacs@master
with:
version: 29.4

- name: Install Eldev
uses: emacs-eldev/setup-eldev@v1

- name: Check out the source code
uses: actions/checkout@v4

- name: Test the project
env:
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
ANTHROPIC_KEY: ${{ secrets.ANTHROPIC_KEY }}
# I can't seem to get Gemini to stop rate limiting me, temporarily disabling.
# GEMINI_KEY: ${{ secrets.GEMINI_KEY }}
run: |
eldev -p -dtT test
2 changes: 1 addition & 1 deletion llm-integration-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
;; The free Azure tier has extremely restrictive rate limiting.
(sleep-for (string-to-number (or (getenv "AZURE_SLEEP") "60"))))
((member (type-of provider) '(llm-gemini llm-vertex))
(sleep-for 15))))
(sleep-for 30))))

(defun llm-integration-test-string-eq (target actual)
"Test that TARGET approximately equals ACTUAL.
Expand Down

0 comments on commit 5c17623

Please sign in to comment.