Parcourir la source

trying to run basic tests on win, mac

Rodja Trappe il y a 2 ans
Parent
commit
cc31a09ab9
1 fichiers modifiés avec 30 ajouts et 0 suppressions
  1. 30 0
      .github/workflows/test.yml

+ 30 - 0
.github/workflows/test.yml

@@ -42,6 +42,36 @@ jobs:
           name: pytest-screenshots
           path: tests/screenshots
 
+  platforms:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [windows-latest, macos-latest]
+        python-version: ["3.7", "3.11"]
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v2
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Set up Git Bash (Windows)
+        if: runner.os == 'Windows'
+        run: |
+          echo "C:\Program Files\Git\bin\bash.exe" > $GITHUB_PATH
+        shell: bash
+      - name: install dependencies
+        run: |
+          poetry config virtualenvs.create false
+          poetry install
+          # install packages to run the examples
+          pip install opencv-python opencv-contrib-python-headless httpx replicate
+          # try fix issue with importlib_resources
+          pip install importlib-resources
+      - name: test startup
+        run: ./test_startup.sh
+
   slack:
     needs:
       - test