-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.07 KB
/
python-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: python-test
on: [pull_request]
jobs:
python-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
- name: Make envs for testing
run: |
echo "PINECONE_API_KEY=${{secrets.PINECONE_API_KEY}}" >> .env
echo "PINECONE_ENVIRONMENT_REGION=${{secrets.PINECONE_ENVIRONMENT_REGION}}" >> .env
echo "OPENAI_API_KEY=${{secrets.OPENAI_API_KEY}}" >> .env
- name: Test code (pytest)
run: |
make test