Skip to content

Commit bbfaa31

Browse files
authored
Merge pull request #5 from Validus-Risk-Management/pipelines
Add github workflows
2 parents 6fd02c4 + 2fc6afd commit bbfaa31

5 files changed

Lines changed: 273 additions & 201 deletions

File tree

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Package & Publish
2+
on:
3+
push:
4+
branches: [ main ]
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [ 3.8, 3.9, "3.10" ]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install Poetry
20+
uses: abatilo/actions-poetry@v2
21+
with:
22+
poetry-version: 1.4
23+
- name: Install dependencies
24+
run: |
25+
poetry install
26+
- name: Run pre-commit checks
27+
run: |
28+
poetry run pre-commit run --all
29+
- name: Run pytest
30+
run: |
31+
poetry run pytest --cov partifact --cov-report term-missing --cov-report xml
32+
33+
publish:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v2
37+
- name: Build and publish to pypi
38+
uses: JRubics/poetry-publish@v1.16
39+
with:
40+
pypi_token: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Lint & Test
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [ 3.8, 3.9, "3.10" ]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install Poetry
23+
uses: abatilo/actions-poetry@v2
24+
with:
25+
poetry-version: 1.4
26+
- name: Install dependencies
27+
run: |
28+
poetry install
29+
- name: Run pre-commit checks
30+
run: |
31+
poetry run pre-commit run --all
32+
- name: Run pytest
33+
run: |
34+
poetry run pytest --cov partifact --cov-report term-missing --cov-report xml

.gitignore

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
1-
# Byte-compiled / optimized / DLL files
2-
__pycache__/
3-
*.py[cod]
4-
*$py.class
5-
6-
.Python
1+
.idea/
2+
.venv/
73
build/
8-
develop-eggs/
94
dist/
105

11-
.pytest_cache/
12-
13-
__pypackages__/
14-
15-
.venv
16-
17-
# mypy
18-
.mypy_cache/
19-
.dmypy.json
20-
dmypy.json
6+
*.egg-info/
7+
__pycache__/
218

22-
.idea/
9+
*.py[cod]
10+
*.egg
11+
.coverage
12+
coverage.xml
13+
.mypy_cache

0 commit comments

Comments
 (0)