2022-03-07 04:06:16 +00:00
|
|
|
name: Python
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
2022-06-08 07:17:19 +00:00
|
|
|
paths:
|
|
|
|
- python
|
|
|
|
|
2022-03-07 04:06:16 +00:00
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
2022-06-08 07:17:19 +00:00
|
|
|
paths:
|
|
|
|
- python
|
2022-03-07 04:06:16 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-06-08 07:17:19 +00:00
|
|
|
python-version: [ 3.8 ]
|
2022-03-07 04:06:16 +00:00
|
|
|
|
|
|
|
steps:
|
2022-06-08 07:17:19 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
- name: Install poetry
|
|
|
|
run: pip install poetry==1.1.13
|
|
|
|
|
|
|
|
- name: Install package
|
|
|
|
run: |
|
|
|
|
cd python
|
|
|
|
poetry install
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
cd python
|
|
|
|
poetry run pytest -v -s tests
|
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
run: |
|
|
|
|
cd python
|
|
|
|
poetry run flake8 .
|