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

50 lines
1018 B
YAML
Raw Normal View History

2023-02-10 23:08:01 -06:00
name: CI
2023-02-11 23:43:56 -06:00
on:
workflow_dispatch:
2023-02-11 22:54:15 -06:00
push:
2023-02-11 23:23:21 -06:00
branches:
- 'main'
paths-ignore:
- 'README.md'
- '.github/**'
2023-02-10 23:08:01 -06:00
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-11 08:36:01 -06:00
uses: actions/setup-python@v4
2023-02-10 23:08:01 -06:00
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'
2023-02-11 08:48:54 -06:00
# - name: Code Quality
# run: poetry run black . --check
2023-02-10 23:08:01 -06:00
- name: Test with pytest
2023-02-11 11:22:49 -06:00
run: poetry run pytest -m "not skip_ci" tests