Skip to content

Commit 18fd874

Browse files
authored
Merge pull request #829 from tsuyoshicho/fix/testworkflow
ci: Fix build and test error
2 parents 5e7a884 + 0559e18 commit 18fd874

File tree

4 files changed

+71
-17
lines changed

4 files changed

+71
-17
lines changed

Diff for: .github/workflows/buildtest.yml

+54-14
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,22 @@ jobs:
4949
run: |
5050
brew upgrade
5151
brew install lua
52+
- name: Setup Python
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version-file: '.python-version'
56+
- name: Setup venv
57+
run: |
58+
python3 -m venv .venv
59+
source .venv/bin/activate
60+
echo "VIRTUAL_ENV=${VIRTUAL_ENV}" >> $GITHUB_ENV
61+
echo "${VIRTUAL_ENV}/bin" >> $GITHUB_PATH
62+
echo "${VIRTUAL_ENV}/lib" >> $GITHUB_PATH
63+
echo "${VIRTUAL_ENV}/lib64" >> $GITHUB_PATH
64+
echo "LD_LIBRARY_PATH=${VIRTUAL_ENV}/lib:${VIRTUAL_ENV}/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
5265
- name: Setup pip
5366
run: |
54-
if [ "${{ matrix.os }}" = "macos-latest" ]; then
55-
sudo pip3 install -U pip --break-system-packages
56-
else
57-
sudo pip3 install -U pip
58-
fi
67+
pip3 install -U pip
5968
- name: Get pip cache
6069
id: pip-cache
6170
run: |
@@ -69,11 +78,10 @@ jobs:
6978
${{ runner.os }}-pip-
7079
- name: Setup cached item
7180
run: |
72-
if [ "${{ matrix.os }}" = "macos-latest" ]; then
73-
pip3 install --user -r requirements.txt --break-system-packages
74-
else
75-
pip3 install --user -r requirements.txt
76-
fi
81+
pip3 install -r requirements.txt
82+
echo '::group:: pip list'
83+
pip3 list
84+
echo '::endgroup::'
7785
- name: Setup Vim
7886
id: 'vim'
7987
uses: thinca/action-setup-vim@v2
@@ -110,13 +118,21 @@ jobs:
110118
env:
111119
THEMIS_PROFILE: ${{ github.workspace }}/vim-profile-${{ runner.os }}-${{ matrix.vim }}-${{ matrix.type }}.txt
112120
run: |
113-
export PATH=$(python3 -m site --user-base)/bin:${PATH}
121+
echo '::group:: Profile file: ${THEMIS_PROFILE}'
122+
cat "${THEMIS_PROFILE}"
123+
echo '::endgroup::'
114124
covimerage write_coverage "${THEMIS_PROFILE}"
125+
echo '::group:: coverage file: .coverage_covimerage'
126+
cat .coverage_covimerage
127+
echo '::endgroup::'
115128
coverage xml
129+
echo '::group:: xml file: coverage.xml'
130+
cat coverage.xml
131+
echo '::endgroup::'
116132
- name: Send coverage
117133
uses: codecov/codecov-action@v5
118134
with:
119-
file: ./coverage.xml
135+
files: ./coverage.xml
120136
env_vars: OS,VIMVER
121137
windows:
122138
strategy:
@@ -172,6 +188,16 @@ jobs:
172188
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
173189
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $lua)
174190
Write-Output "$($lua)" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
191+
- name: Setup Python
192+
uses: actions/setup-python@v5
193+
with:
194+
python-version-file: '.python-version'
195+
- name: Setup venv
196+
run: |
197+
python -m venv .venv
198+
.venv\Scripts\activate
199+
echo "VIRTUAL_ENV=%VIRTUAL_ENV%" >> %GITHUB_ENV%
200+
echo "%VIRTUAL_ENV%\Scripts" >> %GITHUB_PATH%
175201
- name: Setup pip
176202
id: setup
177203
run: |
@@ -187,6 +213,12 @@ jobs:
187213
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
188214
restore-keys: |
189215
${{ runner.os }}-pip-
216+
- name: Setup cached item
217+
run: |
218+
pip install -r requirements.txt
219+
echo '::group:: pip list'
220+
pip list
221+
echo '::endgroup::'
190222
- name: Setup Vim
191223
id: 'vim'
192224
uses: thinca/action-setup-vim@v2
@@ -226,11 +258,19 @@ jobs:
226258
THEMIS_PROFILE: ${{ github.workspace }}/vim-profile-${{ runner.os }}-${{ matrix.vim }}-${{ matrix.type }}.txt
227259
shell: pwsh
228260
run: |
229-
pip install -r requirements.txt
261+
echo '::group:: Profile file: ${Env:THEMIS_PROFILE}'
262+
cat "${Env:THEMIS_PROFILE}"
263+
echo '::endgroup::'
230264
covimerage write_coverage ${Env:THEMIS_PROFILE}
265+
echo '::group:: coverage file: .coverage_covimerage'
266+
cat .coverage_covimerage
267+
echo '::endgroup::'
231268
coverage xml
269+
echo '::group:: xml file: coverage.xml'
270+
cat coverage.xml
271+
echo '::endgroup::'
232272
- name: Send coverage
233273
uses: codecov/codecov-action@v5
234274
with:
235-
file: ./coverage.xml
275+
files: ./coverage.xml
236276
env_vars: OS,VIMVER

Diff for: .python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13.2

Diff for: requirements.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage==4.5.4
2+
covimerage

Diff for: requirements.txt

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
###### Requirements without Version Specifiers ######
21
#
3-
covimerage
4-
###### Requirements with Version Specifiers ######
2+
# This file is autogenerated by pip-compile with Python 3.13
3+
# by the following command:
54
#
5+
# pip-compile
6+
#
7+
attrs==25.1.0
8+
# via covimerage
9+
click==7.0
10+
# via covimerage
11+
coverage==4.5.4
12+
# via
13+
# -r requirements.in
14+
# covimerage
15+
covimerage==0.2.2
16+
# via -r requirements.in

0 commit comments

Comments
 (0)