Skip to content

Commit dbd5ad1

Browse files
author
Ishmeet Bindra
committed
GitHub Action setup
1 parent 3f98d26 commit dbd5ad1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/pull_request.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PR Checks
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
name: "Test"
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-python@v4
13+
with:
14+
python-version: 3.8
15+
- name: cache poetry install
16+
uses: actions/cache@v3
17+
with:
18+
path: ~/.local
19+
key: poetry-1.3.2
20+
- uses: snok/install-poetry@v1
21+
with:
22+
version: 1.3.2
23+
virtualenvs-create: true
24+
virtualenvs-in-project: true
25+
- name: cache deps
26+
id: cache-deps
27+
uses: actions/cache@v3
28+
with:
29+
path: .venv
30+
key: pydeps-${{ hashFiles('**/poetry.lock') }}
31+
- run: poetry install --no-interaction --no-root
32+
if: steps.cache-deps.outputs.cache-hit != 'true'
33+
- name: Run Unit-tests
34+
run: poetry run pytest tests

0 commit comments

Comments
 (0)