浏览代码

do not test macos, too complicated right now

Rodja Trappe 2 年之前
父节点
当前提交
000cbb9895
共有 1 个文件被更改,包括 60 次插入67 次删除
  1. 60 67
      .github/workflows/test.yml

+ 60 - 67
.github/workflows/test.yml

@@ -3,76 +3,72 @@ name: Run Tests
 on: [push]
 
 jobs:
-  # test:
-  #   strategy:
-  #     matrix:
-  #       python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
-  #     fail-fast: false
-  #   runs-on: ubuntu-latest
-  #   timeout-minutes: 15
-  #   steps:
-  #     - uses: actions/checkout@v3
-  #     - name: set up Python
-  #       uses: actions/setup-python@v4
-  #       with:
-  #         python-version: ${{ matrix.python }}
-  #     - name: set up Poetry
-  #       uses: abatilo/actions-poetry@v2.0.0
-  #       with:
-  #         poetry-version: "1.3.1"
-  #     - 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
-  #     - name: setup chromedriver
-  #       uses: nanasess/setup-chromedriver@v1
-  #     - name: pytest
-  #       run: pytest
-  #     - name: upload screenshots
-  #       uses: actions/upload-artifact@v2
-  #       env:
-  #         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-  #       with:
-  #         name: pytest-screenshots
-  #         path: tests/screenshots
+  pytest:
+    strategy:
+      matrix:
+        python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+      fail-fast: false
+    runs-on: ubuntu-latest
+    timeout-minutes: 15
+    steps:
+      - uses: actions/checkout@v3
+      - name: set up Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: ${{ matrix.python }}
+      - name: set up Poetry
+        uses: abatilo/actions-poetry@v2.0.0
+        with:
+          poetry-version: "1.3.1"
+      - 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
+      - name: setup chromedriver
+        uses: nanasess/setup-chromedriver@v1
+      - name: pytest
+        run: pytest
+      - name: upload screenshots
+        uses: actions/upload-artifact@v2
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          name: pytest-screenshots
+          path: tests/screenshots
 
-  # slack:
-  #   needs:
-  #     - test
-  #   if: always() # also execute when test fails
-  #   runs-on: ubuntu-latest
-  #   steps:
-  #     - name: Determine if we need to notify
-  #       uses: Jimdo/should-i-notify-action@main
-  #       id: should_notify
-  #       with:
-  #         needs_context: ${{ toJson(needs) }}
-  #         github_token: ${{ secrets.GITHUB_TOKEN }}
-  #     - name: Slack workflow notification
-  #       if: steps.should_notify.outputs.should_send_message == 'yes'
-  #       uses: Gamesight/slack-workflow-status@master
-  #       with:
-  #         repo_token: ${{ secrets.GITHUB_TOKEN }}
-  #         slack_webhook_url: ${{ secrets.SLACK_ROBOTICS_CI_WEBHOOK }}
-  #         channel: "robotik-ci"
-  #         name: "NiceGUI"
+  slack:
+    needs:
+      - test
+    if: always() # also execute when test fails
+    runs-on: ubuntu-latest
+    steps:
+      - name: Determine if we need to notify
+        uses: Jimdo/should-i-notify-action@main
+        id: should_notify
+        with:
+          needs_context: ${{ toJson(needs) }}
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+      - name: Slack workflow notification
+        if: steps.should_notify.outputs.should_send_message == 'yes'
+        uses: Gamesight/slack-workflow-status@master
+        with:
+          repo_token: ${{ secrets.GITHUB_TOKEN }}
+          slack_webhook_url: ${{ secrets.SLACK_ROBOTICS_CI_WEBHOOK }}
+          channel: "robotik-ci"
+          name: "NiceGUI"
 
-  platforms:
-    runs-on: ${{ matrix.os }}
+  windows:
+    runs-on: windows-latest
     strategy:
       fail-fast: false
       matrix:
-        os: [macos-latest] #windows-latest,
         python-version: ["3.7", "3.11"]
-        exclude: # macos seems to have issues with 3.7; skipping because it's not crucial
-          - os: macos-latest
-            python-version: "3.7"
     steps:
       - name: Check out repository
         uses: actions/checkout@v2
@@ -89,9 +85,6 @@ jobs:
         run: |
           echo "C:\Program Files\Git\bin\bash.exe" > $GITHUB_PATH
         shell: bash
-      - name: Install coreutils (macOS)
-        if: runner.os == 'macOS'
-        run: brew install coreutils
       - name: install dependencies
         run: |
           poetry config virtualenvs.create false