From ce68644ede704d35bd1460d08bfeb05f4b061ec8 Mon Sep 17 00:00:00 2001 From: Llewellyn Falco Date: Wed, 6 Dec 2023 17:05:55 -0700 Subject: [PATCH] . e clean up to run_tests.sh Co-Authored-By: 4dsherwood <4dsherwood@users.noreply.github.com> --- .github/workflows/test.yml | 11 +---------- .github/workflows/test_current_release.yml | 9 ++------- .github/workflows/test_min.yml | 7 +------ .gitignore | 1 + README.md | 8 +------- b.txt | 3 --- mdsnippets.json | 1 + run_tests.sh | 4 ++++ ...yTests.test_verify_automatic_approval.approved.txt | 2 +- 9 files changed, 12 insertions(+), 34 deletions(-) delete mode 100644 b.txt create mode 100755 run_tests.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 765cce3e..ac08d7d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,15 +18,6 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - # begin-snippet: install_prereqs - python -m pip install --upgrade pip - pip install tox - pip install pytest - # end-snippet - name: Test run: | - # begin-snippet: run_tests - tox -e py # Run tox using the version of Python in `PATH` - # end-snippet + ./run_tests.sh diff --git a/.github/workflows/test_current_release.yml b/.github/workflows/test_current_release.yml index 2de54c7e..e7a2dfcf 100644 --- a/.github/workflows/test_current_release.yml +++ b/.github/workflows/test_current_release.yml @@ -26,11 +26,6 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Run Tests run: | - python -m pip install --upgrade pip - pip install tox - pip install pytest - - name: Test - run: | - tox -e py # Run tox using the version of Python in `PATH` + ./run_tests.sh diff --git a/.github/workflows/test_min.yml b/.github/workflows/test_min.yml index 8baff180..3683f6cc 100644 --- a/.github/workflows/test_min.yml +++ b/.github/workflows/test_min.yml @@ -18,12 +18,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox - pip install pytest - name: Test run: | python ./generate_prod_min.py - tox -e min + ./run_tests.sh \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7aaf3c5f..e3318058 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,4 @@ venv *.sqlite3 .mypy_cache .DS_Store +tests/approved_files/VerifyTests.test_verify_automatic_approval.approved.txt diff --git a/README.md b/README.md index a8a31a0f..eacfdc74 100644 --- a/README.md +++ b/README.md @@ -315,13 +315,7 @@ The best way to contribute is to [join our weekly mob/ensemble](./docs/Contribut Pull requests are welcomed, particularly those accompanied by automated tests. To run the self-tests: -#### 1. setup - - snippet: install_prereqs - - #### 2. run - - snippet: run_tests +`./run_tests.sh` This will run the self-tests on several python versions. We support python 3.8 and above. diff --git a/b.txt b/b.txt deleted file mode 100644 index 30ed1225..00000000 --- a/b.txt +++ /dev/null @@ -1,3 +0,0 @@ -b -b -b \ No newline at end of file diff --git a/mdsnippets.json b/mdsnippets.json index 8cc3da0c..6442a794 100644 --- a/mdsnippets.json +++ b/mdsnippets.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json", "ExcludeDirectories": [ "target" ], + "include": [ ".github/workflows" ], "Convention": "InPlaceOverwrite", "TocLevel": 5 } diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 00000000..d232a8e3 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,4 @@ +python -m pip install --upgrade pip +pip install tox +pip install pytest +tox -e py \ No newline at end of file diff --git a/tests/approved_files/VerifyTests.test_verify_automatic_approval.approved.txt b/tests/approved_files/VerifyTests.test_verify_automatic_approval.approved.txt index 78c6baef..0cfbf088 100644 --- a/tests/approved_files/VerifyTests.test_verify_automatic_approval.approved.txt +++ b/tests/approved_files/VerifyTests.test_verify_automatic_approval.approved.txt @@ -1 +1 @@ -2 +2