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

49 lines
998 B
YAML
Raw Normal View History

2023-02-11 00:08:01 -05:00
name: CI
2023-02-11 23:54:15 -05:00
on:
push:
2023-02-12 00:23:21 -05:00
branches:
- 'main'
paths-ignore:
- 'README.md'
- '.github/**'
2023-02-11 00:08:01 -05:00
jobs:
test:
2023-02-11 00:21:44 -05:00
runs-on: [self-hosted, linux]
2023-02-11 00:08:01 -05:00
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
2023-02-11 09:09:49 -05:00
- name: Set up Python 3.9
2023-02-11 09:36:01 -05:00
uses: actions/setup-python@v4
2023-02-11 00:08:01 -05:00
with:
2023-02-11 09:09:49 -05:00
python-version: 3.9
2023-02-11 00:08:01 -05:00
2023-02-11 00:10:24 -05:00
- name: Install Poetry Action
uses: snok/install-poetry@v1.3.3
2023-02-11 00:08:01 -05: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-11 00:14:35 -05:00
2023-02-11 00:08:01 -05:00
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
2023-02-11 09:48:54 -05:00
# - name: Code Quality
# run: poetry run black . --check
2023-02-11 00:08:01 -05:00
- name: Test with pytest
2023-02-11 12:22:49 -05:00
run: poetry run pytest -m "not skip_ci" tests