Skip to content

Merge pull request #82 from RecandChat/Readme_Chatbot_demo_vid #88

Merge pull request #82 from RecandChat/Readme_Chatbot_demo_vid

Merge pull request #82 from RecandChat/Readme_Chatbot_demo_vid #88

Workflow file for this run

name: PR Gate
# We are calling the api when running the tests
# Therefore we need a PAT to authenticate
# We also need to wait between testing the different python version to avoid rate limiting the GitHib API
# This is why we cannot use the matrix to run the tests in parallel
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
tags:
description: 'Tags to label this manual run (optional)'
default: 'Manual run'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test Python on ubuntu-22.04
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create Secrets Directory
run: mkdir -p ./secrets
- name: Set up Local Environment File
run: echo '{"token":"${{ secrets.GH_PAT }}"}' > ./secrets/pat.json
- name: Set up Google Credentials
run: echo '${{ secrets.GOOGLE_CREDS }}' > ./secrets/token.json
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies for Python 3.9
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests for Python 3.9
run: |
python -m pytest tests -v
env:
PYTHONPATH: ${{ github.workspace }}
- name: Sleep for 60 seconds
run: sleep 60
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies for Python 3.11
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests for Python 3.11
run: |
python -m pytest tests -v
env:
PYTHONPATH: ${{ github.workspace }}