Skip to content
Snippets Groups Projects
Verified Commit 7d8ea45c authored by Beatriz Rizental's avatar Beatriz Rizental Committed by Pier Angelo Vendrame
Browse files

fixup! Add CI for Base Browser

Bug 42722: Cache mozbuild path instead of specifically the pip path
parent 7e9be9ca
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,15 @@
stage: lint
interruptible: true
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
MOZBUILD_STATE_PATH: "$CI_PROJECT_DIR/.cache/mozbuild"
cache:
paths:
- node_modules
- .cache/pip
- .cache/mozbuild
# Store the cache regardless on job outcome
when: 'always'
# Share the cache throughout all pipelines running for a given branch
key: $CI_COMMIT_REF_SLUG
eslint:
extends: .base
......
......@@ -98,13 +98,13 @@ if __name__ == "__main__":
)
args = parser.parse_args()
command = [
"./mach",
"lint",
"-v",
*(s for l in args.linters for s in ("-l", l)),
*get_list_of_changed_files(),
]
result = subprocess.run(command, text=True)
sys.exit(result.returncode)
changed_files = get_list_of_changed_files()
if changed_files:
command = ["./mach", "lint", "-v"]
for linter in args.linters:
command.extend(["-l", linter])
command.extend(changed_files)
result = subprocess.run(command, text=True)
sys.exit(result.returncode)
else:
print("No files changed, skipping linting.")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment