-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.13 KB
/
tests.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
38
39
40
41
42
43
44
45
name: tests
on:
push:
workflow_call:
secrets:
OPENAI_API_KEY:
required: true
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: python -m pip install -e .[test]
- name: Set environment variable using secret
run: echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> $GITHUB_ENV
- name: Run test suite
run: pytest -v
code-checks:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install black
run: python -m pip install black=="23.*" mypy=="1.*"
- name: Check style
run: black --check .
- name: chek types
run: mypy .