File tree 2 files changed +11
-8
lines changed
2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 7
7
cpplint :
8
8
runs-on : ubuntu-latest
9
9
steps :
10
- - uses : actions/checkout@v2
11
- - uses : actions/setup-python@v2
10
+ - uses : actions/checkout@v3
11
+ - uses : actions/setup-python@v4
12
+ with :
13
+ python-version : 3.x
12
14
- run : pip install cpplint
13
15
- run : cpplint --recursive .
Original file line number Diff line number Diff line change @@ -11,11 +11,12 @@ jobs:
11
11
cpplint_modified_files :
12
12
runs-on : ubuntu-latest
13
13
steps :
14
- - uses : actions/checkout@v2
15
- - uses : actions/setup-python@v2
16
- - shell : python # Show the version of shell: python and then upgrade shell: python to Python 3.8
17
- run : import sys ; print("Python {}.{}.{}".format(*sys.version_info)) # Legacy Python :-(
18
- - run : sudo update-alternatives --install /usr/bin/python python ${pythonLocation}/bin/python3.8 10
14
+ - uses : actions/checkout@v1 # v1, NOT v2 or v3
15
+ - uses : actions/setup-python@v4
16
+ with :
17
+ python-version : 3.x
18
+ - shell : python # Print the version of Python
19
+ run : import sys ; print("Python {}.{}.{}".format(*sys.version_info))
19
20
- run : python -m pip install cpplint
20
21
- run : git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
21
22
- run : git diff origin/master --name-only > git_diff.txt
26
27
import subprocess
27
28
import sys
28
29
29
- print("Python {}.{}.{}".format(*sys.version_info)) # Python 3.8
30
+ print("Python {}.{}.{}".format(*sys.version_info)) # Currently Python 3.11.2
30
31
with open("git_diff.txt") as in_file:
31
32
modified_files = sorted(in_file.read().splitlines())
32
33
print("{} files were modified.".format(len(modified_files)))
You can’t perform that action at this time.
0 commit comments