Feat/#178 #193
Workflow file for this run
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: CI | |
on: | |
pull_request: | |
paths: | |
- "api/**.py" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repositry | |
uses: actions/checkout@v4 | |
- name: Create .env file | |
run: | | |
touch .env | |
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> .env | |
echo "VOICEVOX_API_KEY=${{ secrets.VOICEVOX_API_KEY }}" >> .env | |
echo "OPENAI_ASSISTANT_ID=${{ vars.OPENAI_ASSISTANT_ID }}" >> .env | |
echo "OPENAI_THREAD_ID =${{ vars.OPENAI_THREAD_ID }}" >> .env | |
echo "AZURE_SAS_TOKEN=${{ secrets.AZURE_SAS_TOKEN }}" >> .env | |
echo "AZURE_STORAGE_ACCOUNT=${{ vars.AZURE_STORAGE_ACCOUNT }}" >> .env | |
echo "PUBSUB_CONNECTION_STRING=${{ secrets.PUBSUB_CONNECTION_STRING }}" >> .env | |
- name: Run docker-compose Build | |
run: docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d | |
- name: Run flake8 | |
run: docker compose exec api flake8 | |
- name: Run test | |
run: docker compose exec api pytest --asyncio-mode=auto |