diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 5b8885b7..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,70 +0,0 @@ -version: 2.1 - -orbs: - win: circleci/windows@5.0 - -commands: # all jobs/workflows use same commands - diagnostic: - steps: - - run: - name: install_devtools - command: pip install . numpy - - run: - name: first_test - command: python ./app/test1.py - -jobs: - linux-docker: # similiar to the one below us - docker: # machine specifies a linux vm, can we just use docker for the pull? - - image: cimg/python:3.12.3 - resource_class: small - steps: - - checkout - - run: - name: install_chrome - command: sudo apt-get update && sudo apt-get install chromium-browser - - diagnostic - - windows-x64: - executor: - name: win/default - steps: - - checkout - - run: - name: install_chrome - command: choco install googlechrome -y --ignore-checksums - - diagnostic - - osx: - macos: # indicate that we are using the macOS executor - xcode: 15.4.0 - resource_class: macos.m1.medium.gen1 - steps: - - checkout - - run: - name: install_chrome - command: brew install google-chrome - - diagnostic - -workflows: - 1-arch-3-os: # this workflow will do mac, linux, and windows without arch xcompile - jobs: - - hold: - type: approval - - linux-docker: - requires: - - hold - - windows-x64: - requires: - - hold - - osx: - requires: - - hold - cheap_test: - jobs: - - hold: - type: approval - - linux-docker: - requires: - - hold - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..38cfb696 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,48 @@ +name: test-wf +on: pull_request +jobs: + test-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v1 + - name: Install Dependencies + run: sudo apt-get update && sudo apt-get install chromium-browser + - name: Install devtools + run: ls && pip install .[dev] numpy + - name: diagnostic + run: dtdoctor + - name: test1 + run: pytest + - name: test2 + run: python app/test1.py + test-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install Dependencies + run: choco install googlechrome -y --ignore-checksums + - name: Install devtools + run: pip install .[dev] numpy + - name: diagnostic + run: dtdoctor + - name: test1 + run: pytest + - name: test2 + run: python app/test1.py + test-mac: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install Dependencies + run: brew install google-chrome + - name: Install devtools + run: pip install .[dev] numpy + - name: diagnostic + run: dtdoctor + - name: test1 + run: pytest + - name: test2 + run: python app/test1.py diff --git a/devtools/browser.py b/devtools/browser.py index 2a2f20d8..a0eb9cd0 100644 --- a/devtools/browser.py +++ b/devtools/browser.py @@ -542,10 +542,11 @@ def diagnose(): print(which_browser()) print("Running a very simple test...") try: - import pip - print(pip.get_installed_distributions()) - except ImportError: - print("No pip installed for getting version") + import subprocess, sys # noqa + print(subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])) + print(subprocess.check_output(["git", "describe", "--all", "--tags", "--long", "--always",])) + print(sys.version) + print(sys.version_info) finally: pass async def test(): diff --git a/pyproject.toml b/pyproject.toml index 0fd615b8..4c607a67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ dev = [ ] [project.scripts] -devtools-doctor = "devtools.browser:diagnose" +dtdoctor = "devtools.browser:diagnose" [tool.ruff.lint] ignore = ["E701"] diff --git a/tests/test_placeholder.py b/tests/test_placeholder.py new file mode 100644 index 00000000..201975fc --- /dev/null +++ b/tests/test_placeholder.py @@ -0,0 +1,2 @@ +def test_placeholder(): + pass