-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (27 loc) · 868 Bytes
/
test.yml
File metadata and controls
29 lines (27 loc) · 868 Bytes
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
name: Pytest
on: push
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install pytest
pip install pytest-asyncio
pip install .
- name: Run Test
env:
API_KEY: ${{ secrets.TRACKUNIT_API_KEY }}
run: |
echo $API_KEY | python -c $'import sys\nkey = sys.stdin.readline().strip()\nif len(key) == 32:\n open("api.key","w").write(key)\nelse:\n print("wrong length "+str(len(key)))\n sys.exit(1)\n'
pytest