Skip to content

Commit f9ea9f1

Browse files
committed
add actions
1 parent 2bcc2f1 commit f9ea9f1

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version:
13+
- 3.6
14+
- 3.7
15+
- 3.8
16+
- 3.9
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Get full python version
24+
id: full-python-version
25+
run: |
26+
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
27+
- name: Set up cache
28+
uses: actions/cache@v2
29+
with:
30+
path: .venv
31+
key: ${{ runner.os }}-venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
32+
- name: Install and configure Poetry
33+
run: |
34+
pip install poetry
35+
poetry config virtualenvs.in-project true
36+
- name: Install dependencies
37+
run: poetry install
38+
- name: Run pytest
39+
run: |
40+
poetry run pytest -vvv -ra --cov=cryptojwt --isort --black

0 commit comments

Comments
 (0)