Skip to content

Commit

Permalink
merge analyzer and testing folder
Browse files Browse the repository at this point in the history
  • Loading branch information
knielsen404 committed Jan 20, 2025
1 parent 5328c32 commit fa3ece5
Show file tree
Hide file tree
Showing 258 changed files with 7,180 additions and 5,333 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/analyzer_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Run Tests

on:
push:
branches: [ "main", "ci-testing", "merge_testing_analyzer" ]

permissions:
contents: read

jobs:
test-examples:
name: Test invariant.examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12.2
uses: actions/setup-python@v3
with:
python-version: "3.12.2"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with dev
- name: Run invariant.examples
env:
OPENAI_API_KEY: ${{ secrets.CI_OPENAI_API_KEY }}
run: |
poetry run python -m unittest discover -s invariant/analyzer/examples -p "*_example.py"
test-no-extras:
name: Test without extra dependencies
# (some tests will be skipped, but this is the default setup when users install the package)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12.2
uses: actions/setup-python@v3
with:
python-version: "3.12.2"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --without dev
- name: Run tests
run: |
poetry run pytest invariant/tests/analyzer
62 changes: 0 additions & 62 deletions .github/workflows/analyzer_test.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,14 @@ jobs:

- name: Setup dependencies
run: |
cd testing
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)/testing" >> $GITHUB_ENV
- name: Set PyPI credentials
run: |
cd testing
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- name: Publish to PyPI
run: |
cd testing
poetry publish --build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Invariant testing CI

on:
push:
branches: [ "main" ]
branches: [ "main", "merge_testing_analyzer" ]
pull_request:
branches: [ "main" ]

Expand All @@ -21,15 +21,11 @@ jobs:
python-version: "3.12.2"
- name: Setup dependencies
run: |
cd testing
python -m pip install --upgrade pip
pip install poetry
poetry install --with dev
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)/testing" >> $GITHUB_ENV
- name: Run tests
env:
OPENAI_API_KEY: ${{ secrets.INVARIANT_TESTING_OPENAI_KEY }}
run: |
cd testing
poetry run pytest --cov=invariant --cov-report=term --cov-fail-under=60 -s -vv tests
poetry run pytest --cov=invariant --cov-report=term --cov-fail-under=60 -s -vv invariant/tests
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Code:

```python
# content of tests/test_weather.py
import invariant.testing.functional as F
import invariant.testing.testing.functional as F
from invariant.testing import Trace, assert_equals

def test_weather():
Expand Down
13 changes: 0 additions & 13 deletions analyzer/invariant/__init__.py

This file was deleted.

119 changes: 0 additions & 119 deletions analyzer/invariant/cli.py

This file was deleted.

8 changes: 0 additions & 8 deletions analyzer/invariant/stdlib/invariant/__init__.py

This file was deleted.

7 changes: 0 additions & 7 deletions analyzer/invariant/stdlib/invariant/detectors/__init__.py

This file was deleted.

43 changes: 0 additions & 43 deletions analyzer/pyproject.toml

This file was deleted.

Loading

0 comments on commit fa3ece5

Please sign in to comment.