| name: Brain CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| paths: | |
| - "Brain/**" | |
| - "requirements.txt" | |
| workflow_dispatch: | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| FIREBASE_SERVICE_ACCOUNT_TEST3_83FFC: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TEST3_83FFC }} | |
| REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }} | |
| PINECONE_ENV: ${{ secrets.PINECONE_ENV }} | |
| PINECONE_KEY: ${{ secrets.PINECONE_KEY }} | |
| HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }} | |
| GITHUB_TOKEN: ${{ github.token }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11.2' | |
| cache: 'pip' | |
| - name: Brain - Install | |
| run: pip install -r requirements.txt | |
| - name: Brain - Test | |
| run: python -m pytest | |
| - name: Brain - api test with saucectl | |
| uses: saucelabs/saucectl-run-action@v3 | |
| with: | |
| # Sauce Labs Credentials. | |
| sauce-username: ${{ secrets.SAUCE_USERNAME }} | |
| sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }} | |