mirror of
https://github.com/markqvist/rnsh.git
synced 2025-03-10 09:29:34 -04:00
Creating CI pipeline
This commit is contained in:
parent
601c549358
commit
716052ab47
45
.github/workflows/python-package.yml
vendored
Normal file
45
.github/workflows/python-package.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
name: CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.11
|
||||
|
||||
- name: Install Poetry
|
||||
uses: dschep/install-poetry-action@v1.2
|
||||
|
||||
- name: Cache Poetry virtualenv
|
||||
uses: actions/cache@v1
|
||||
id: cache
|
||||
with:
|
||||
path: ~/.virtualenvs
|
||||
key: poetry-${{ hashFiles('**/poetry.lock') }}
|
||||
restore-keys: |
|
||||
poetry-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
- name: Set Poetry config
|
||||
run: |
|
||||
poetry config settings.virtualenvs.in-project false
|
||||
poetry config settings.virtualenvs.path ~/.virtualenvs
|
||||
|
||||
- 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
|
Loading…
x
Reference in New Issue
Block a user