|
@@ -4,6 +4,7 @@ on:
|
|
pull_request_review:
|
|
pull_request_review:
|
|
types: [submitted]
|
|
types: [submitted]
|
|
|
|
|
|
|
|
+
|
|
permissions:
|
|
permissions:
|
|
contents: read
|
|
contents: read
|
|
|
|
|
|
@@ -16,7 +17,7 @@ jobs:
|
|
strategy:
|
|
strategy:
|
|
matrix:
|
|
matrix:
|
|
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
|
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
|
- node-version: ["15.x"]
|
|
|
|
|
|
+ node-version: ["16.x"]
|
|
|
|
|
|
steps:
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/checkout@v3
|
|
@@ -31,13 +32,12 @@ jobs:
|
|
python-version: ${{ matrix.python-version }}
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
# Clone Pynecone Website Repo For integration tests
|
|
# Clone Pynecone Website Repo For integration tests
|
|
- - name: Clone Pynecone Website Repo
|
|
|
|
|
|
+ - name: Clone Pynecone Examples Repo
|
|
uses: actions/checkout@v3
|
|
uses: actions/checkout@v3
|
|
with:
|
|
with:
|
|
repository: pynecone-io/pynecone-examples
|
|
repository: pynecone-io/pynecone-examples
|
|
path: pynecone-examples
|
|
path: pynecone-examples
|
|
-
|
|
|
|
- # Install poetry
|
|
|
|
|
|
+
|
|
- name: cache poetry install
|
|
- name: cache poetry install
|
|
uses: actions/cache@v2
|
|
uses: actions/cache@v2
|
|
with:
|
|
with:
|
|
@@ -66,25 +66,7 @@ jobs:
|
|
- name: Init Website
|
|
- name: Init Website
|
|
working-directory: ./pynecone-examples/counter
|
|
working-directory: ./pynecone-examples/counter
|
|
run: poetry run pc init
|
|
run: poetry run pc init
|
|
- - name: Run Website and check for errors
|
|
|
|
- working-directory: ./pynecone-examples/counter
|
|
|
|
|
|
+ - name: Check for errors
|
|
run: |
|
|
run: |
|
|
- curl -fsSL https://bun.sh/install | bash -s -- bun-v0.5.5
|
|
|
|
- timeout 2m poetry run pc run &
|
|
|
|
- sleep 10
|
|
|
|
- URL="127.0.0.1:3000"
|
|
|
|
-
|
|
|
|
- # make the curl request and save the response and HTTP status code
|
|
|
|
- RESPONSE=$(curl -s -w "\n%{http_code}" $URL)
|
|
|
|
-
|
|
|
|
- # extract the HTTP status code from the response
|
|
|
|
- HTTP_STATUS=$(echo "$RESPONSE" | tail -n1)
|
|
|
|
-
|
|
|
|
- # check for errors based on the HTTP status code
|
|
|
|
- if [[ $HTTP_STATUS -ge 400 ]]; then
|
|
|
|
- echo "Error: HTTP status code $HTTP_STATUS"
|
|
|
|
- exit 1
|
|
|
|
- fi
|
|
|
|
-
|
|
|
|
- echo "success with HTTP STATUS: $HTTP_STATUS"
|
|
|
|
-
|
|
|
|
|
|
+ chmod +x ./scripts/integration.sh
|
|
|
|
+ ./scripts/integration.sh ./pynecone-examples/counter dev
|