Skip to content

Commit a35406e

Browse files
authored
Merge pull request #15 from RSS-Engineering/github_actions_for_pytest
Running Tests via GitHub Action
2 parents 3f98d26 + 68fc207 commit a35406e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/pull_request.yml

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

0 commit comments

Comments
 (0)