Skip to content

Commit

Permalink
Split tests into separate workflows
Browse files Browse the repository at this point in the history
- Created test-rules-engine-style.yml workflow for checking code style
- Created test-rules-engine-functional.yml workflow for running functional tests- Created test-rules-engine-type.yml workflow for checking typing

Closes #31
  • Loading branch information
kdshea committed Jul 9, 2023
1 parent 39e3a15 commit 1696f6b
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 37 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/test-rules-engine-functional.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test Rules Engine (Functional)

on: [push]

defaults:
run:
working-directory: rules-engine

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
- name: Run tests
run: |
pytest
Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@
name: Test Rules Engine

on: [push]

defaults:
run:
working-directory: rules-engine

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
- name: Check style
run: |
isort --check .
black --check .
- name: Check typing
run: |
mypy .
- name: Run tests
run: |
pytest
name: Test Rules Engine (Style)

on: [push]

defaults:
run:
working-directory: rules-engine

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
- name: Check style
run: |
isort --check .
black --check .
30 changes: 30 additions & 0 deletions .github/workflows/test-rules-engine-type.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test Rules Engine (Type)

on: [push]

defaults:
run:
working-directory: rules-engine

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
- name: Check typing
run: |
mypy .

0 comments on commit 1696f6b

Please sign in to comment.