Bump the python-requirements group across 1 directory with 3 updates … #388
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: Unit Tests | |
permissions: read-all | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '**.py' | |
- 'requirements.txt' | |
- 'config.yaml' | |
- 'test/**.py' | |
- 'cypress/**/**.ts' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install requirements | |
run: | | |
python -m pip install pytest | |
python -m pip install -r requirements.txt | |
- name: Download Sources | |
run: | | |
python -m pip install -U "huggingface-hub[cli]" hf_transfer | |
huggingface-cli login --token ${{ secrets.HF_TOKEN }} | |
huggingface-cli download --repo-type space TotalSundae/dungeons-and-dragons \ | |
--include *.xml \ | |
--local-dir . \ | |
--local-dir-use-symlinks False | |
env: | |
HF_HUB_ENABLE_HF_TRANSFER: 1 | |
- name: Basic Unit Test | |
run: pytest test/test_embed.py -W ignore::DeprecationWarning | |
cypress: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python Requirements | |
run: python -m pip install -r requirements.txt | |
- name: Setup Ollama | |
run: | | |
curl https://ollama.ai/install.sh | sh | |
sleep 5 | |
ollama create volo -f ./Modelfile | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- uses: cypress-io/github-action@v6 | |
with: | |
config-file: ${{ github.workspace }}/cypress/cypress.config.ts | |
record: true | |
spec: cypress/e2e/on_chat_start/spec.cy.ts | |
start: chainlit run app.py -h | |
wait-on: 'http://localhost:8000' | |
wait-on-timeout: 10 | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ github.token }} | |
LANGCHAIN_API_KEY: ${{ secrets.LANGCHAIN_API_KEY }} | |
- uses: cypress-io/github-action@v6 | |
with: | |
config-file: ${{ github.workspace }}/cypress/cypress.config.ts | |
record: true | |
start: chainlit run app.py -h | |
wait-on: 'http://localhost:8000' | |
wait-on-timeout: 10 | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ github.token }} | |
LANGCHAIN_API_KEY: ${{ secrets.LANGCHAIN_API_KEY }} |