generated from langchain-ai/integration-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 changed file
with
61 additions
and
0 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,61 @@ | ||
name: Scheduled tests | ||
run-name: langchain-together Scheduled tests | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 13 * * *' | ||
|
||
env: | ||
POETRY_VERSION: "1.7.1" | ||
|
||
jobs: | ||
build: | ||
name: Python ${{ matrix.python-version }} - ${{ matrix.working-directory }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.8" | ||
- "3.11" | ||
working-directory: | ||
- "libs/together" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }} | ||
uses: "./.github/actions/poetry_setup" | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
poetry-version: ${{ env.POETRY_VERSION }} | ||
working-directory: ${{ matrix.working-directory }} | ||
cache-key: scheduled | ||
|
||
- name: Install dependencies | ||
run: poetry install --with test,test_integration | ||
working-directory: ${{ matrix.working-directory }} | ||
|
||
- name: Run unit tests | ||
run: make tests | ||
working-directory: ${{ matrix.working-directory }} | ||
|
||
- name: Run integration tests | ||
env: | ||
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }} | ||
run: make integration_tests | ||
working-directory: ${{ matrix.working-directory }} | ||
|
||
|
||
- name: Ensure the tests did not create any additional files | ||
working-directory: ${{ matrix.working-directory }} | ||
run: | | ||
set -eu | ||
STATUS="$(git status)" | ||
echo "$STATUS" | ||
# grep will exit non-zero if the target message isn't found, | ||
# and `set -e` above will cause the step to fail. | ||
echo "$STATUS" | grep 'nothing to commit, working tree clean' |