Browse Source

Add taipy-rest package (#13)

Vuillemot Florian 3 years ago
parent
commit
7f0b872e89
4 changed files with 28 additions and 5 deletions
  1. 2 0
      .gitattributes
  2. 22 4
      .github/workflows/setuptools.yml
  3. 3 0
      .gitignore
  4. 1 1
      setup.py

+ 2 - 0
.gitattributes

@@ -0,0 +1,2 @@
+# Set the default behavior, in case people don't have core.autocrlf set.
+* text=auto

+ 22 - 4
.github/workflows/setuptools.yml

@@ -5,6 +5,12 @@ on:
     branches: [ develop ]
   pull_request:
     branches: [ develop ]
+  workflow_dispatch:
+    inputs:
+      user-to-notify:
+        description: "Github username to notify"
+        required: false
+        default: ""
 
 jobs:
   standard-packages:
@@ -12,7 +18,7 @@ jobs:
     strategy:
       matrix:
         python-versions: [ '3.8', '3.9', '3.10' ]
-        os: [ubuntu-18.04, windows-latest]
+        os: [ubuntu-18.04, macos-latest] #, windows-latest]
 
     runs-on: ${{ matrix.os }}
 
@@ -24,10 +30,22 @@ jobs:
 
       - name: Install Taipy without dependencies
         run: |
-          sed -i 's/ssh/https/g' setup.py
-          sed -i 's/git@github/${{ secrets.PERSONAL_TOKEN }}@github/g' setup.py
+          mkdir -p ~/.ssh
+          echo "${{ secrets.SSH_KEY_TAIPY_CORE }}" > ~/.ssh/id_ed25519
+          ssh-keyscan github.com >> ~/.ssh/known_hosts
+          chmod 600 ~/.ssh/id_ed25519
+
           pip install .
           rm -r taipy
 
           python -c "import taipy as tp; tp.Scenario"
-          python -c "import taipy as tp; tp.gui"
+          python -c "import taipy as tp; tp.gui"
+          python -c "import taipy.rest as rest"
+
+      - name: Notify user if failed
+        if: failure()
+        run: |
+          if [[ -n "${{ github.event.inputs.user-to-notify }}" ]]; then
+            curl "${{ secrets.notify_endpoint }}" -d '{"username": "${{ github.event.inputs.user-to-notify }}", "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" }' -H "Content-Type: application/json"
+          fi
+        shell: bash

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+.idea
+.venv
+__pycache__

+ 1 - 1
setup.py

@@ -10,6 +10,7 @@ with open("README.md") as readme_file:
 requirements = [
     "taipy-gui@git+ssh://git@github.com/Avaiga/taipy-gui.git@develop",
     "taipy-core@git+ssh://git@github.com/Avaiga/taipy-core.git@develop",
+    "taipy-rest@git+ssh://git@github.com/Avaiga/taipy-rest.git@develop",
 ]
 
 setup(
@@ -37,4 +38,3 @@ setup(
     version="1.0.0.dev",
     zip_safe=False,
 )
-