From 54b46f14f55e1f9da6551f241414abcfd5dd1288 Mon Sep 17 00:00:00 2001 From: Yuriy Tkach Date: Thu, 11 Apr 2024 01:04:54 +0300 Subject: [PATCH] Add github workflows --- .github/workflows/python-black.yml | 18 ++++++++++++++++++ .github/workflows/python-tests.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/python-black.yml create mode 100644 .github/workflows/python-tests.yml diff --git a/.github/workflows/python-black.yml b/.github/workflows/python-black.yml new file mode 100644 index 0000000..3810d55 --- /dev/null +++ b/.github/workflows/python-black.yml @@ -0,0 +1,18 @@ +name: Black Code Formatter + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Install Black + run: pip install black + - name: Check code formatting with Black + run: black --check . diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml new file mode 100644 index 0000000..9050988 --- /dev/null +++ b/.github/workflows/python-tests.yml @@ -0,0 +1,26 @@ +name: Python Tests + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Run tests with pytest + run: pytest