rnsh/.github/workflows/python-package.yml

43 lines
896 B
YAML
Raw Normal View History

2023-02-10 23:08:01 -06:00
name: CI
on: [push]
jobs:
test:
2023-02-10 23:21:44 -06:00
runs-on: [self-hosted, linux]
2023-02-10 23:08:01 -06:00
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
2023-02-11 08:09:49 -06:00
- name: Set up Python 3.9
2023-02-10 23:08:01 -06:00
uses: actions/setup-python@v1
with:
2023-02-11 08:09:49 -06:00
python-version: 3.9
2023-02-10 23:08:01 -06:00
2023-02-10 23:10:24 -06:00
- name: Install Poetry Action
uses: snok/install-poetry@v1.3.3
2023-02-10 23:08:01 -06:00
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: ~/.virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
2023-02-10 23:14:35 -06:00
2023-02-10 23:08:01 -06:00
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Code Quality
run: poetry run black . --check
- name: Test with pytest
run: poetry run pytest --cov . -n 2