浏览代码

trying to run basic tests on win, mac

Rodja Trappe 2 年之前
父节点
当前提交
cc31a09ab9
共有 1 个文件被更改,包括 30 次插入0 次删除
  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