forked from PrefectHQ/prefect
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.34 KB
/
test-windows-unc.yaml
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
name: Test Windows UNC Paths
on:
workflow_dispatch: # Allow manual triggering
pull_request:
paths:
- "src/prefect/utilities/filesystem.py"
- "scripts/test_unc_paths.py"
- ".github/workflows/test-windows-unc.yaml"
- "requirements.txt"
- "requirements-client.txt"
jobs:
test-unc-paths:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -e .
- name: Create test UNC path and run flow
shell: pwsh
run: |
# Create a test directory
New-Item -ItemType Directory -Path "C:\ShareTest" -Force
# Create network share
New-SmbShare -Name "PrefectTest" -Path "C:\ShareTest" -FullAccess "Everyone"
# Run the test script from the current directory
# This will create and test flows in the UNC path
python scripts/test_unc_paths.py
env:
PYTHONPATH: ${{ github.workspace }}
- name: Cleanup
if: always()
shell: pwsh
run: |
Remove-SmbShare -Name "PrefectTest" -Force