Skip to content

Commit

Permalink
fix: split tests workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Fuggitti <francesco.fuggitti@gmail.com>
  • Loading branch information
francescofuggitti committed Jun 13, 2023
1 parent 0b2515f commit 34ab3f5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,20 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install tox
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-randomly hypothesis-pytest
pip install -r requirements.txt
- name: Unit tests and coverage
run: |
pyver=`echo ${{ matrix.python-version }} | tr -d "."`
tox -e py${{ matrix.python-version }}
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
pytest -k "not gpt" \
--doctest-modules \
nl2ltl tests \
--cov=nl2ltl \
--cov-report=xml \
--cov-report=html \
--cov-report=term \
--hypothesis-show-statistics
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/test_gpt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: test GPT

on: workflow_dispatch

jobs:
run:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8"]

timeout-minutes: 30

steps:
- uses: actions/checkout@main
- uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-randomly hypothesis-pytest
pip install -r requirements.txt
- name: Unit tests and coverage
run: |
pytest test_gpt.py \
--doctest-modules \
nl2ltl tests \
--cov=nl2ltl \
--cov-report=xml \
--cov-report=html \
--cov-report=term \
--hypothesis-show-statistics
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true

0 comments on commit 34ab3f5

Please sign in to comment.