From b40dd746fca2394086e00015053a1ce093e20d80 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Tue, 28 May 2024 02:18:14 +0200 Subject: [PATCH] Run ExplicitImport.jl's checks on CI, closes #886. --- .github/workflows/Check.yml | 38 +++++++++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 13 ------------- 2 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/Check.yml delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/Check.yml b/.github/workflows/Check.yml new file mode 100644 index 0000000000..fd57eb5d3f --- /dev/null +++ b/.github/workflows/Check.yml @@ -0,0 +1,38 @@ +name: Code checks + +on: + pull_request: + push: + branches: ["master"] + +jobs: + + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 + + explicit-imports: + runs-on: ubuntu-latest + name: "ExplicitImports.jl" + steps: + - uses: actions/checkout@v4 + # - uses: julia-actions/setup-julia@v2 + # with: + # version: '1' + - uses: julia-actions/cache@v1 + - uses: julia-actions/julia-buildpkg@v1 + - name: Install dependencies + shell: julia {0} + run: | + using Pkg + Pkg.add("ExplicitImports") + - name: ExplicitImports.jl code checks + shell: julia --project {0} + run: | + using Ferrite, ExplicitImports + allow_unanalyzable = (ApplyStrategy, ColoringAlgorithm) # baremodules + check_no_implicit_imports(Ferrite; allow_unanalyzable) + check_no_stale_explicit_imports(Ferrite; allow_unanalyzable) + check_all_qualified_accesses_via_owners(Ferrite) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 5b6e58d775..0000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Lint - -on: - pull_request: - push: - branches: [master] - -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1