Skip to content

Commit 6bcdb51

Browse files
authored
Merge pull request #117 from rstudio/gha-fix
Update weekly tests to include `rsconnect-python`
2 parents f8f8632 + 29dc00c commit 6bcdb51

2 files changed

Lines changed: 122 additions & 8 deletions

File tree

.github/workflows/weekly.yml

Lines changed: 116 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ name: Weekly Tests
88

99
on:
1010
schedule:
11-
# At 00:00 on Monday
12-
- cron: "03 14 * * FRI"
11+
- cron: "03 14 * * MON"
1312

1413
jobs:
1514
vetiver_main_pins_main:
@@ -20,7 +19,8 @@ jobs:
2019
strategy:
2120
matrix:
2221
# Minimum and Maximum supported versions
23-
python-version: ['3.7', '3.10']
22+
python-version: ['3.10']
23+
2424

2525
steps:
2626
- uses: actions/checkout@v2
@@ -32,10 +32,18 @@ jobs:
3232
- name: Install dependencies
3333
run: |
3434
python -m pip install --upgrade pip
35-
python -m pip install 'vetiver[dev,torch]'
35+
python -m pip install '.[all]'
3636
python -m pip install --upgrade git+https://github.com/rstudio/pins-python
3737
38-
- name: Run Tests
38+
- name: run RStudio Connect
39+
run: |
40+
docker-compose up --build -d
41+
make dev
42+
env:
43+
RSC_LICENSE: ${{ secrets.RSC_LICENSE }}
44+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
45+
46+
- name: Run tests
3947
run: |
4048
pytest
4149
@@ -50,10 +58,22 @@ jobs:
5058
strategy:
5159
matrix:
5260
# Minimum and Maximum supported versions
53-
python-version: ['3.7', '3.10']
61+
python-version: ['3.10']
5462

5563
steps:
56-
- uses: actions/checkout@v2
64+
- name: Get latest release with tag from GitHub API
65+
id: latestrelease
66+
run: |
67+
echo "::set-output name=releasetag::$(curl -s https://api.github.com/repos/rstudio/vetiver-python/releases/latest | jq '.tag_name' | sed 's/\"//g')"
68+
69+
- name: Confirm Release Tag
70+
run: |
71+
echo ${{ steps.latestrelease.outputs.releasetag }}
72+
73+
- name: Checkout Code
74+
uses: actions/checkout@v3
75+
with:
76+
ref: ${{ steps.latestrelease.outputs.releasetag }}
5777

5878
- uses: actions/setup-python@v2
5979
with:
@@ -62,9 +82,97 @@ jobs:
6282
- name: Install dependencies
6383
run: |
6484
python -m pip install --upgrade pip
65-
python -m pip install -e '.[dev,torch]'
85+
python -m pip install .[dev]
6686
python -m pip install --upgrade git+https://github.com/rstudio/pins-python
6787
88+
- name: run RStudio Connect
89+
run: |
90+
docker-compose up --build -d
91+
make dev
92+
env:
93+
RSC_LICENSE: ${{ secrets.RSC_LICENSE }}
94+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
95+
96+
- name: Run Tests
97+
run: |
98+
pytest
99+
100+
vetiver_pypi_rsconnect_latest:
101+
name: 'vetiver pypi, rsconnect latest'
102+
runs-on: ubuntu-latest
103+
104+
strategy:
105+
matrix:
106+
# Minimum and Maximum supported versions
107+
python-version: ['3.10']
108+
109+
steps:
110+
- name: Get latest release with tag from GitHub API
111+
id: latestrelease
112+
run: |
113+
echo "::set-output name=releasetag::$(curl -s https://api.github.com/repos/rstudio/vetiver-python/releases/latest | jq '.tag_name' | sed 's/\"//g')"
114+
115+
- name: Confirm Release Tag
116+
run: |
117+
echo ${{ steps.latestrelease.outputs.releasetag }}
118+
119+
- name: Checkout Code
120+
uses: actions/checkout@v3
121+
with:
122+
ref: ${{ steps.latestrelease.outputs.releasetag }}
123+
124+
- uses: actions/setup-python@v2
125+
with:
126+
python-version: ${{ matrix.python-version }}
127+
128+
- name: Install dependencies
129+
run: |
130+
python -m pip install --upgrade pip
131+
python -m pip install .[dev]
132+
python -m pip install --upgrade git+https://github.com/rstudio/rsconnect-python
133+
134+
- name: run RStudio Connect
135+
run: |
136+
docker-compose up --build -d
137+
make dev
138+
env:
139+
RSC_LICENSE: ${{ secrets.RSC_LICENSE }}
140+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
141+
142+
- name: Run Tests
143+
run: |
144+
pytest
145+
146+
vetiver_latest_rsconnect_latest:
147+
name: 'vetiver latest, rsconnect latest'
148+
runs-on: ubuntu-latest
149+
150+
strategy:
151+
matrix:
152+
# Minimum and Maximum supported versions
153+
python-version: ['3.10']
154+
155+
steps:
156+
- uses: actions/checkout@v2
157+
158+
- uses: actions/setup-python@v2
159+
with:
160+
python-version: ${{ matrix.python-version }}
161+
162+
- name: Install dependencies
163+
run: |
164+
python -m pip install --upgrade pip
165+
python -m pip install '.[all]'
166+
python -m pip install --upgrade git+https://github.com/rstudio/rsconnect-python
167+
168+
- name: run RStudio Connect
169+
run: |
170+
docker-compose up --build -d
171+
make dev
172+
env:
173+
RSC_LICENSE: ${{ secrets.RSC_LICENSE }}
174+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
175+
68176
- name: Run Tests
69177
run: |
70178
pytest

setup.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ install_requires =
3737
importlib-metadata>=4.4 # NOTE: Remove when python_requires>=3.8
3838

3939
[options.extras_require]
40+
all =
41+
vetiver[dev]
42+
vetiver[torch]
43+
vetiver[statsmodels]
44+
vetiver[xgboost]
45+
4046
dev =
4147
pytest
4248
pytest-cov

0 commit comments

Comments
 (0)