Verified Commit fa88a433 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 ac54df57
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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
+8 −8
Original line number Diff line number Diff line
@@ -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(),
    ]
    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.")