File tree Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 8
8
"lint" : " gts lint" ,
9
9
"fix" : " gts fix" ,
10
10
"affected" : " bun run ./src/main.ts affected" ,
11
- "linter " : " bun run ./src/main.ts linter " ,
12
- "tests " : " bun run ./src/main.ts tests "
11
+ "ci-lint " : " bun run ./src/main.ts lint " ,
12
+ "ci-test " : " bun run ./src/main.ts test "
13
13
},
14
14
"dependencies" : {
15
15
"immutable" : " ^4.3.7" ,
Original file line number Diff line number Diff line change 14
14
15
15
import * as path from 'path' ;
16
16
import * as subprocess from '../subprocess' ;
17
- import { Config } from '../config' ;
17
+ import { Config } from '../config' ;
18
18
19
19
export const python = ( version = '3.11' ) =>
20
20
new Config ( {
@@ -30,6 +30,7 @@ export const python = (version = '3.11') =>
30
30
lint : args => {
31
31
const noxfile = path . join ( args . root , 'noxfile-template.py' ) ;
32
32
subprocess . run ( 'cp' , [ noxfile , 'noxfile.py' ] ) ;
33
+ subprocess . run ( 'nox' , [ '-s' , 'blacken' ] ) ;
33
34
subprocess . run ( 'nox' , [ '-s' , 'lint' ] ) ;
34
35
} ,
35
36
testAll : args => {
Original file line number Diff line number Diff line change 13
13
// limitations under the License.
14
14
15
15
import * as git from './git' ;
16
- import { Config } from './config' ;
17
- import { python } from './config/python' ;
18
- import { Affected } from './affected' ;
16
+ import { Config } from './config' ;
17
+ import { python } from './config/python' ;
18
+ import { Affected } from './affected' ;
19
19
20
20
function getConfig ( lang : string ) : Config {
21
21
switch ( lang ) {
@@ -44,13 +44,13 @@ function main(command: string) {
44
44
console . log ( JSON . stringify ( affected ) ) ;
45
45
return ;
46
46
}
47
- case 'linter ' : {
47
+ case 'lint ' : {
48
48
const config = getConfig ( process . argv [ 3 ] ) ;
49
49
const affected : Affected = JSON . parse ( process . env [ process . argv [ 4 ] ] || '' ) ;
50
50
config . lint ( affected ) ;
51
51
return ;
52
52
}
53
- case 'tests ' : {
53
+ case 'test ' : {
54
54
const config = getConfig ( process . argv [ 3 ] ) ;
55
55
const affected : Affected = JSON . parse ( process . env [ process . argv [ 4 ] ] || '' ) ;
56
56
config . test ( affected ) ;
Original file line number Diff line number Diff line change 61
61
- uses : actions/setup-python@v5
62
62
with :
63
63
python-version : ' 3.12'
64
- - run : pip install nox
64
+ - run : pip install nox black
65
65
- run : bun install
66
- - run : bun run linter python AFFECTED
66
+ - run : bun run ci-lint python AFFECTED
67
67
env :
68
68
AFFECTED : ${{toJson(matrix.affected)}}
69
69
93
93
workload_identity_provider : ${{env.WORKLOAD_IDENTITY_PROVIDER}}
94
94
- run : pip install nox
95
95
- run : bun install
96
- - run : bun run tests python${{matrix.python-version}} AFFECTED
96
+ - run : bun run ci-test python${{matrix.python-version}} AFFECTED
97
97
env :
98
98
AFFECTED : ${{toJson(matrix.affected)}}
You can’t perform that action at this time.
0 commit comments