@@ -51,65 +51,89 @@ jobs:
51
51
name : Run functional tests
52
52
needs :
53
53
- build-and-test
54
- runs-on : ubuntu-latest
54
+ strategy :
55
+ matrix :
56
+ os : [ubuntu-latest, windows-latest]
57
+ runs-on : ${{ matrix.os }}
55
58
steps :
56
59
- uses : actions/checkout@v4
57
60
- uses : actions/download-artifact@v4
58
61
with :
59
- name : klawa-ubuntu-latest
62
+ name : klawa-${{ matrix.os }}
60
63
path : zig-out/bin
61
64
- name : Install dependencies
65
+ shell : bash
66
+ run : |
67
+ pwd
68
+ ls -alh zig-out/bin
69
+ - if : matrix.os == 'ubuntu-latest'
70
+ name : Install dependencies
62
71
shell : bash
63
72
run : |
64
73
sudo apt-get update
65
74
sudo apt-get install ffmpeg xdotool x11-apps xvfb
75
+ - if : matrix.os == 'windows-latest'
76
+ name : Install dependencies
77
+ shell : bash
78
+ run : |
79
+ choco install autohotkey.portable ffmpeg
80
+ - if : matrix.os == 'windows-latest'
81
+ name : Install Mesa
82
+ shell : cmd
83
+ run : |
84
+ curl.exe -L --output mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/24.2.7/mesa3d-24.2.7-release-msvc.7z
85
+ "C:\Program Files\7-Zip\7z.exe" x mesa.7z
86
+ dir
87
+ systemwidedeploy.cmd 1
66
88
- name : Install python dependencies
67
89
shell : bash
68
90
run : |
69
91
cd tests
70
- python -m venv .env
71
- . .env/bin/activate
72
92
pip install -r dev-requirements.txt
73
- - name : Run tests
93
+ - if : matrix.os == 'ubuntu-latest'
94
+ name : Fix executable permisions
74
95
shell : bash
75
96
run : |
76
97
chmod +x zig-out/bin/klawa
98
+ - name : Run tests
99
+ shell : bash
100
+ run : |
77
101
# not running with pytest-xdist because renders are way off
78
102
# when framerate drops below expected 60fps:
79
- cd tests && . .env/bin/activate && python -m pytest src/
103
+ cd tests && python -m pytest src/
80
104
- uses : actions/upload-artifact@v4
81
105
if : always()
82
106
with :
83
- name : report
107
+ name : report-${{ matrix.os }}
84
108
path : tests/report/
85
109
retention-days : 2
86
110
if-no-files-found : error
87
111
88
- deploy-preview :
89
- name : Deploy tests results
90
- needs :
91
- - run-functional-tests
92
- runs-on : ubuntu-latest
93
- defaults :
94
- run :
95
- shell : bash
96
- working-directory : ./tests
97
- steps :
98
- - uses : actions/checkout@v4
99
- - uses : actions/download-artifact@v4
100
- with :
101
- name : report
102
- path : tests/report
103
- - name : Install Vercel CLI
104
- run : npm install --global vercel@latest
105
- - name : Pull Vercel Environment Information
106
- run : vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
107
- - name : Build Project Artifacts
108
- run : vercel build --token=${{ secrets.VERCEL_TOKEN }}
109
- - name : Deploy Project Artifacts to Vercel
110
- run : vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > url.txt
111
- - name : Add summary
112
- shell : bash
113
- run : |
114
- echo '### Deployed' >> $GITHUB_STEP_SUMMARY
115
- cat url.txt >> $GITHUB_STEP_SUMMARY
112
+ # deploy-preview:
113
+ # name: Deploy tests results
114
+ # needs:
115
+ # - run-functional-tests
116
+ # runs-on: ubuntu-latest
117
+ # defaults:
118
+ # run:
119
+ # shell: bash
120
+ # working-directory: ./tests
121
+ # steps:
122
+ # - uses: actions/checkout@v4
123
+ # - uses: actions/download-artifact@v4
124
+ # with:
125
+ # name: report
126
+ # path: tests/report
127
+ # - name: Install Vercel CLI
128
+ # run: npm install --global vercel@latest
129
+ # - name: Pull Vercel Environment Information
130
+ # run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
131
+ # - name: Build Project Artifacts
132
+ # run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
133
+ # - name: Deploy Project Artifacts to Vercel
134
+ # run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > url.txt
135
+ # - name: Add summary
136
+ # shell: bash
137
+ # run: |
138
+ # echo '### Deployed' >> $GITHUB_STEP_SUMMARY
139
+ # cat url.txt >> $GITHUB_STEP_SUMMARY
0 commit comments