Skip to content

Commit d7d1ad7

Browse files
committed
Add testing action
1 parent 6f8894d commit d7d1ad7

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Testing
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: actions/setup-python@v2
16+
with:
17+
python-version: "3.10"
18+
19+
- uses: actions/cache@v2
20+
with:
21+
path: ~/.local
22+
key: poetry-1.2.2
23+
24+
- uses: snok/install-poetry@v1
25+
with:
26+
version: 1.2.2
27+
virtualenvs-create: true
28+
virtualenvs-in-project: true
29+
30+
- uses: actions/cache@v2
31+
id: cache-deps
32+
with:
33+
path: .venv
34+
key: pydeps-${{ hashFiles('**/poetry.lock') }}
35+
36+
- run: poetry install --no-interaction --no-root
37+
if: steps.cache-deps.outputs.cache-hit != 'true'
38+
39+
- run: poetry install --no-interaction
40+
41+
- run: poetry run pytest

0 commit comments

Comments
 (0)