-
Notifications
You must be signed in to change notification settings - Fork 24
111 lines (100 loc) · 3.58 KB
/
deploy_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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@v4
with:
name: distributions
path: dist/
test-connect:
needs: distributions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
PY_VERSION:
- 3.11.7
- 3.12.1
steps:
- uses: extractions/setup-just@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete unused stuff to save space
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android
- 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@v4
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 }}"
QUARTO_VERSION: "1.4.546"
# This allows us to start Connect separately in our own docker container
CONNECT_SERVER: "http://localhost:3939"
IMAGE_OS: "rstudio/connect:ubuntu22"
remote: "yes"
run: |
cd integration-testing
docker compose build connect-cli
docker compose build client-cli
docker compose up -d connect-cli
docker compose up -d client-cli
docker compose run --rm client-cli just ../test/connect-rsconnect-python/test/rsconnect-python/_start-dev
# Videos are captured whether the suite fails or passes
- name: Save videos
uses: actions/upload-artifact@v4
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@v4
if: failure()
with:
name: cypress-screenshots_${{ matrix.PY_VERSION }}_native
path: test/connect-rsconnect-python/cypress/screenshots
if-no-files-found: ignore