File tree 4 files changed +13
-5
lines changed
4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ jobs:
111
111
- name : Compare outputs
112
112
run : |
113
113
. venv/bin/activate
114
- python tests/primer/primer_tool.py compare --base-file=output_main. txt --new-file=output_pr .txt
114
+ python tests/primer/primer_tool.py compare --base-file=output_${{ steps.python.outputs.python-version }}_main. txt --new-file=output_${{ steps.python.outputs.python-version }}_pr .txt
115
115
- name : Post comment
116
116
id : post-comment
117
117
uses : actions/github-script@v6
Original file line number Diff line number Diff line change @@ -101,4 +101,6 @@ jobs:
101
101
uses : actions/upload-artifact@v3
102
102
with :
103
103
name : primer_output
104
- path : tests/.pylint_primer_tests/output_main.txt
104
+ path :
105
+ tests/.pylint_primer_tests/output_${{ steps.python.outputs.python-version
106
+ }}_main.txt
Original file line number Diff line number Diff line change @@ -172,12 +172,14 @@ jobs:
172
172
uses : actions/upload-artifact@v3
173
173
with :
174
174
name : primer_output_pr
175
- path : tests/.pylint_primer_tests/output_pr.txt
175
+ path :
176
+ tests/.pylint_primer_tests/output_${{ steps.python.outputs.python-version
177
+ }}_pr.txt
176
178
- name : Upload output of 'main'
177
179
uses : actions/upload-artifact@v3
178
180
with :
179
181
name : primer_output_main
180
- path : output_main .txt
182
+ path : output_${{ steps.python.outputs.python-version }}_main .txt
181
183
182
184
# Save PR number so we know which PR to comment on
183
185
- name : Save PR number
Original file line number Diff line number Diff line change 6
6
7
7
import argparse
8
8
import json
9
+ import sys
9
10
from io import StringIO
10
11
from pathlib import Path
11
12
from typing import Dict , List , Union
@@ -126,7 +127,10 @@ def _handle_run_command(self) -> None:
126
127
print (f"Successfully primed { package } ." )
127
128
128
129
with open (
129
- PRIMER_DIRECTORY / f"output_{ self .config .type } .txt" , "w" , encoding = "utf-8"
130
+ PRIMER_DIRECTORY
131
+ / f"output_{ '.' .join (str (i ) for i in sys .version_info [:3 ])} _{ self .config .type } .txt" ,
132
+ "w" ,
133
+ encoding = "utf-8" ,
130
134
) as f :
131
135
json .dump (packages , f )
132
136
You can’t perform that action at this time.
0 commit comments