Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alanisaac committed Jul 18, 2023
1 parent 1696f6b commit 597879b
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 91 deletions.
19 changes: 19 additions & 0 deletions .github/actions/setup-rules-engine/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "setup-rules-engine"
description: "Sets up the environment for the rules engine"
inputs:
python-version:
description: Python version to use (e.g. "3.10")
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
30 changes: 0 additions & 30 deletions .github/workflows/test-rules-engine-functional.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/test-rules-engine-style.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/test-rules-engine-type.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/test-rules-engine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: lint Rules Engine

on: [push]

defaults:
run:
working-directory: rules-engine

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

steps:
- name: Set up environment
uses: "./.github/actions/setup-rules-engine"
with:
python-version: ${{ matrix.python-version }}
- name: Check style
run: |
isort --check .
black --check .
mypy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- name: Set up environment
uses: "./.github/actions/setup-rules-engine"
with:
python-version: ${{ matrix.python-version }}
- name: Check typing
run: |
mypy .
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- name: Set up environment
uses: "./.github/actions/setup-rules-engine"
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
pytest

0 comments on commit 597879b

Please sign in to comment.