Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .github/workflows/deploy_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: rsconnect-python-tests-at-night
on:
schedule:
- cron: "0 09 * * *" # Runs 11 AM UTC == 2 AM PDT
workflow_dispatch:

jobs:
distributions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-python@v4
with:
python-version: 3.8.x
- run: pip install -e '.[test]'
- run: pip freeze
- run: make dist
id: create_dist
- uses: actions/upload-artifact@v3
with:
name: distributions
path: dist/

test-connect:
needs: distributions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
PY_VERSION:
- 3.8.10
- 3.9.5
PYTHON_BUILD: [binary]
steps:
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v4
with:
repository: rstudio/connect
path: 'test/connect-rsconnect-python'
sparse-checkout: |
test/rsconnect-python
scripts
examples
sparse-checkout-cone-mode: false
token: ${{ secrets.CONNECT_PAT }}

- name: Build docker container-image
run: |
cd test/connect-rsconnect-python/test/rsconnect-python/
docker-compose --profile rsconnect build

- name: Restore dist
uses: actions/download-artifact@v3
with:
name: distributions
path: dist/

- name: Run rsconnect-python Tests
env:
CONNECT_LICENSE: "${{ secrets.RSC_LICENSE }}"
PY_VERSION: ${{ matrix.PY_VERSION }}
CONNECT_CONFIG: "test-rsconnect-python.gcfg"
TEST_SUBSET: "ALL"
RSC_AUTOMATION_PAT: "${{ secrets.CONNECT_PAT }}"
ADMIN_API_KEY: "${{ secrets.ADMIN_API_KEY }}"
PYTHON_BUILD: "${{ matrix.PYTHON_BUILD }}"
QUARTO_VERSION: "1.3.340"

# This allows us to start Connect separately in our own docker container
CONNECT_SERVER: "http://localhost:3939"
remote: "yes"
run: |
cd integration-testing
docker compose pull connect
docker compose up -d connect
just ../test/connect-rsconnect-python/test/rsconnect-python/test-rsconnect-python-repo-${PYTHON_BUILD}

# Videos are captured whether the suite fails or passes
- name: Save videos
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos_${{ matrix.PY_VERSION }}_native
path: test/connect-rsconnect-python/cypress/videos
if-no-files-found: ignore

# Screenshots are only captured on failure
- name: Save screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots_${{ matrix.PY_VERSION }}_native
path: test/connect-rsconnect-python/cypress/screenshots
if-no-files-found: ignore

95 changes: 88 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fetch-depth: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install '.[test]'
Expand All @@ -55,7 +55,7 @@ jobs:
fetch-depth: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.8.x
- run: pip install --pre '.[test]'
Expand All @@ -74,14 +74,14 @@ jobs:
fetch-depth: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.8.x
- run: pip install -e '.[test]'
- run: pip freeze
- run: make dist
id: create_dist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: distributions
path: dist/
Expand Down Expand Up @@ -131,12 +131,12 @@ jobs:
fetch-depth: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.8.x
- run: pip freeze
- run: make docs
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: docs
path: docs/site/
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
Expand Down Expand Up @@ -247,3 +247,84 @@ jobs:
path: integration-testing/cypress/screenshots
if-no-files-found: ignore
retention-days: 1

test-connect:
needs: distributions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
PY_VERSION:
- 3.8.10
- 3.9.5
PYTHON_BUILD: [binary]
steps:
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Checkout the rsconnect-python tests from Connect
- uses: actions/checkout@v4
with:
repository: rstudio/connect
path: 'test/connect-rsconnect-python'
sparse-checkout: |
test/rsconnect-python
scripts
examples
sparse-checkout-cone-mode: false
token: ${{ secrets.CONNECT_PAT }}

- name: Build docker container-image
run: |
cd test/connect-rsconnect-python/test/rsconnect-python/
docker-compose --profile rsconnect build

- name: Restore dist
uses: actions/download-artifact@v3
with:
name: distributions
path: dist/

- name: Run rsconnect-python Tests
env:
CONNECT_LICENSE: "${{ secrets.RSC_LICENSE }}"
PY_VERSION: ${{ matrix.PY_VERSION }}
TEST_SUBSET: "CI"
RSC_AUTOMATION_PAT: "${{ secrets.CONNECT_PAT }}"
ADMIN_API_KEY: "${{ secrets.ADMIN_API_KEY }}"
PYTHON_BUILD: "${{ matrix.PYTHON_BUILD }}"
QUARTO_VERSION: "1.3.340"

# This allows us to start Connect separately in our own docker container
CONNECT_SERVER: "http://localhost:3939"
remote: "yes"
run: |
cd integration-testing
docker compose pull connect
docker compose up -d connect
just ../test/connect-rsconnect-python/test/rsconnect-python/test-rsconnect-python-repo-${PYTHON_BUILD}

# Videos are captured whether the suite fails or passes
- name: Save videos
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos_${{ matrix.PY_VERSION }}_native
path: test/connect-rsconnect-python/cypress/videos
if-no-files-found: ignore

# Screenshots are only captured on failure
- name: Save screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots_${{ matrix.PY_VERSION }}_native
path: test/connect-rsconnect-python/cypress/screenshots
if-no-files-found: ignore


Loading