Skip to content

Commit e633d5d

Browse files
committed
Update several actions to the latest stable versions
Note: third-party action versions not updated in this PR The simonw/actions-latest versions list only tracks actions/* org actions, so these three third-party actions were left untouched but should be revisited separately: - pypa/gh-action-pypi-publish@release/v1 — pinned to the maintainer's documented floating branch ref (their README explicitly shows this usage). Latest concrete tag is v1.14.0. Per pypa's own "pro tip," pinning to an exact tag/SHA instead of the branch is more reproducible — worth considering. - MishaKav/pytest-coverage-comment@main — currently tracks the main branch directly (not a version tag). Latest release is v1.10.0. Should pin to a tagged version instead of main to avoid unreviewed changes landing silently. - archive/github-actions-slack@v2.8.0 — real version bump available to v3.1.0 (major version jump). Needs a changelog/breaking-change check before upgrading.
1 parent a70be81 commit e633d5d

6 files changed

Lines changed: 191 additions & 15 deletions

File tree

.github/workflows/code-coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ${{ matrix.os }}
1717

1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v7
2020

2121
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
22-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@v6
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525

.github/workflows/meta-checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ jobs:
2020
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
2121
2222
- name: cache
23-
uses: actions/cache@v4
23+
uses: actions/cache@v6
2424
with:
2525
path: ${{ steps.pip-cache.outputs.dir }}
2626
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
2727
restore-keys: |
2828
${{ runner.os }}-${{ matrix.python-version }}-pip-
2929
30-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v7
3131

3232
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
33-
uses: actions/setup-python@v5
33+
uses: actions/setup-python@v6
3434
with:
3535
python-version: ${{ matrix.python-version }}
3636

.github/workflows/publish-pypi.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
name: Build and check wheel
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v7
1919
with:
2020
fetch-depth: 0
21-
- uses: actions/setup-python@v5
21+
- uses: actions/setup-python@v6
2222
with:
2323
python-version: '3.13'
2424
- name: Build dist files
@@ -29,7 +29,7 @@ jobs:
2929
git describe --tag --dirty --always
3030
- name: Check wheel structure
3131
run: python -m pytest test/test_packaging.py -m packaging -v
32-
- uses: actions/upload-artifact@v4
32+
- uses: actions/upload-artifact@v7
3333
with:
3434
name: dist
3535
path: dist/
@@ -39,7 +39,7 @@ jobs:
3939
needs: build
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/download-artifact@v4
42+
- uses: actions/download-artifact@v8
4343
with:
4444
name: dist
4545
path: dist/
@@ -60,7 +60,7 @@ jobs:
6060
python-version: ['3.x']
6161
runs-on: ${{ matrix.os }}
6262
steps:
63-
- uses: actions/setup-python@v5
63+
- uses: actions/setup-python@v6
6464
with:
6565
python-version: ${{ matrix.python-version }}
6666
- name: Install from Test PyPI
@@ -76,7 +76,7 @@ jobs:
7676
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }}
7777
runs-on: ubuntu-latest
7878
steps:
79-
- uses: actions/download-artifact@v4
79+
- uses: actions/download-artifact@v8
8080
with:
8181
name: dist
8282
path: dist/

.github/workflows/pypi-smoke-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
28-
uses: actions/setup-python@v5
28+
uses: actions/setup-python@v6
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131
- name: pip install

.github/workflows/run-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ jobs:
2525
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
2626
2727
- name: cache
28-
uses: actions/cache@v4
28+
uses: actions/cache@v6
2929
with:
3030
path: ${{ steps.pip-cache.outputs.dir }}
3131
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
3232
restore-keys: |
3333
${{ runner.os }}-${{ matrix.python-version }}-pip-
3434
35-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@v7
3636

3737
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
38-
uses: actions/setup-python@v5
38+
uses: actions/setup-python@v6
3939
with:
4040
python-version: ${{ matrix.python-version }}
4141
allow-prereleases: ${{ matrix.allow-prereleases || false }}
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
name: Test Package Installation
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'pyproject.toml'
7+
- 'setup.py'
8+
- 'MANIFEST.in'
9+
- 'tableauserverclient/**'
10+
- '.github/workflows/test-package-install.yml'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
test-wheel-install:
18+
name: Test wheel installation on ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-latest, macos-latest, windows-latest]
23+
python-version: ['3.11']
24+
25+
runs-on: ${{ matrix.os }}
26+
27+
steps:
28+
- uses: actions/checkout@v7
29+
with:
30+
fetch-depth: 0
31+
32+
- uses: actions/setup-python@v6
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Install build tools
37+
run: |
38+
python -m pip install --upgrade pip
39+
pip install build check-wheel-contents
40+
41+
- name: Build wheel
42+
run: python -m build
43+
44+
- name: Check wheel contents
45+
run: check-wheel-contents dist/*.whl
46+
47+
- name: Inspect wheel structure (Unix)
48+
if: runner.os != 'Windows'
49+
run: |
50+
unzip -l dist/*.whl > wheel-contents.txt
51+
cat wheel-contents.txt
52+
53+
echo "Checking for correct package structure..."
54+
55+
# Check for required files
56+
if ! grep -q "tableauserverclient/__init__.py" wheel-contents.txt; then
57+
echo "❌ ERROR: tableauserverclient/__init__.py not found in wheel!"
58+
exit 1
59+
fi
60+
61+
if ! grep -q "tableauserverclient/server/server.py" wheel-contents.txt; then
62+
echo "❌ ERROR: tableauserverclient/server/server.py not found in wheel!"
63+
exit 1
64+
fi
65+
66+
if ! grep -q "tableauserverclient/models/workbook_item.py" wheel-contents.txt; then
67+
echo "❌ ERROR: tableauserverclient/models/workbook_item.py not found in wheel!"
68+
exit 1
69+
fi
70+
71+
# Check that files are NOT at wrong location (missing tableauserverclient/ prefix)
72+
# Look for lines like " 123 server/server.py" which would be wrong
73+
if grep -E "^[[:space:]]+[0-9]+.*[[:space:]]server/server.py" wheel-contents.txt; then
74+
echo "❌ ERROR: Files found at wrong location (missing tableauserverclient/ prefix)!"
75+
echo "Files should be under tableauserverclient/, not at root level"
76+
exit 1
77+
fi
78+
79+
echo "✅ Wheel structure looks correct"
80+
81+
- name: Inspect wheel structure (Windows)
82+
if: runner.os == 'Windows'
83+
shell: pwsh
84+
run: |
85+
$wheel = Get-ChildItem dist/*.whl | Select-Object -First 1
86+
Add-Type -AssemblyName System.IO.Compression.FileSystem
87+
$zip = [System.IO.Compression.ZipFile]::OpenRead($wheel.FullName)
88+
$zip.Entries | Select-Object FullName | Out-File wheel-contents.txt
89+
$zip.Dispose()
90+
91+
Get-Content wheel-contents.txt
92+
93+
$contents = Get-Content wheel-contents.txt -Raw
94+
95+
if ($contents -notmatch "tableauserverclient/__init__.py") {
96+
Write-Error "❌ ERROR: tableauserverclient/__init__.py not found in wheel!"
97+
exit 1
98+
}
99+
100+
if ($contents -notmatch "tableauserverclient/server/server.py") {
101+
Write-Error "❌ ERROR: tableauserverclient/server/server.py not found in wheel!"
102+
exit 1
103+
}
104+
105+
Write-Host "✅ Wheel structure looks correct"
106+
107+
- name: Test installation in clean environment
108+
shell: bash
109+
run: |
110+
# Create and activate virtual environment
111+
python -m venv test-env
112+
113+
if [ "$RUNNER_OS" == "Windows" ]; then
114+
source test-env/Scripts/activate
115+
else
116+
source test-env/bin/activate
117+
fi
118+
119+
# Install the wheel (not editable!)
120+
pip install dist/*.whl
121+
122+
# Move to temp directory to ensure we're not importing from source
123+
if [ "$RUNNER_OS" == "Windows" ]; then
124+
cd $TEMP
125+
else
126+
cd /tmp
127+
fi
128+
129+
# Test basic import
130+
python -c "import tableauserverclient as TSC; print('✅ Import successful!')"
131+
132+
# Test version access
133+
python -c "import tableauserverclient as TSC; print(f'Version info: {TSC.get_versions()}')"
134+
135+
# Test that key classes are available
136+
python -c "
137+
import tableauserverclient as TSC
138+
139+
# Check main classes are available
140+
assert hasattr(TSC, 'Server'), 'Server class not found'
141+
assert hasattr(TSC, 'TableauAuth'), 'TableauAuth class not found'
142+
assert hasattr(TSC, 'WorkbookItem'), 'WorkbookItem class not found'
143+
assert hasattr(TSC, 'DatasourceItem'), 'DatasourceItem class not found'
144+
assert hasattr(TSC, 'ProjectItem'), 'ProjectItem class not found'
145+
146+
print('✅ All expected classes are available')
147+
"
148+
149+
# Test basic functionality
150+
python -c "
151+
import tableauserverclient as TSC
152+
153+
server = TSC.Server('http://example.com', use_server_version=False)
154+
print(f'✅ Server object created: {server}')
155+
156+
auth = TSC.TableauAuth('username', 'password', 'site')
157+
print(f'✅ TableauAuth object created: {auth}')
158+
"
159+
160+
# Show where package is installed
161+
python -c "
162+
import tableauserverclient
163+
import os
164+
pkg_location = os.path.dirname(tableauserverclient.__file__)
165+
print(f'Package installed at: {pkg_location}')
166+
"
167+
168+
echo "✅ All installation tests passed!"
169+
170+
- name: Upload wheel as artifact
171+
if: runner.os == 'Linux' # Only upload once
172+
uses: actions/upload-artifact@v7
173+
with:
174+
name: wheel
175+
path: dist/*.whl
176+
retention-days: 7

0 commit comments

Comments
 (0)