Skip to content

Commit cc66080

Browse files
committed
Update workflow
1 parent 0ed2bd0 commit cc66080

File tree

2 files changed

+50
-38
lines changed

2 files changed

+50
-38
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/testing.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Testing
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: [ 3.8, 3.9 ]
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install Poetry
27+
uses: snok/install-poetry@v1
28+
with:
29+
virtualenvs-create: true
30+
virtualenvs-in-project: true
31+
installer-parallel: true
32+
33+
- name: Load cached venv
34+
id: cached-poetry-dependencies
35+
uses: actions/cache@v2
36+
with:
37+
path: .venv
38+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
39+
40+
- name: Install dependencies
41+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
42+
run: poetry install --no-interaction --no-root
43+
44+
- name: Install library
45+
run: poetry install --no-interaction
46+
47+
- name: Run tests
48+
run: |
49+
source .venv/bin/activate
50+
pytest tests/

0 commit comments

Comments
 (0)