Skip to content

Commit 7eafc4e

Browse files
committed
add ci workflows for code quality and testing
1 parent dfd3f81 commit 7eafc4e

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/quality.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Code Quality
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-python@v2
15+
- run: pip install poetry && poetry install
16+
- uses: pre-commit/[email protected]

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
python-version: ['3.8','3.9']
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- run: pip install poetry && poetry install
24+
- name: Build python package
25+
run: poetry build
26+
- name: Run tests
27+
run: poetry run pytest
28+
- uses: codecov/codecov-action@v1
29+
with:
30+
token: ${{ secrets.CODECOV_TOKEN }}
31+
env_vars: OS, PYTHON
32+
fail_ci_if_error: false

0 commit comments

Comments
 (0)