Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 141bd9c

Browse files
committed
Add test github workflow
1 parent c6d5d37 commit 141bd9c

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/test.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
- name: Set up Python 3.9
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: 3.9
19+
20+
- uses: snok/install-poetry@v1.3.3
21+
with:
22+
virtualenvs-create: true
23+
virtualenvs-in-project: true
24+
25+
- name: Cache Dependencies
26+
uses: actions/cache@v2
27+
id: cache-dependencies
28+
with:
29+
path: .venv
30+
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
31+
32+
- name: Install Dependencies if cache doesn't hit
33+
if: steps.cache-dependencies.cache-hit != 'true'
34+
run: poetry install
35+
36+
- name: Test
37+
run: poetry run invoke test
38+
39+
- name: Upload Code Coverage
40+
run: bash <(curl -s https://codecov.io/bash)
41+
env:
42+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)