diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml new file mode 100644 index 0000000..1310d5d --- /dev/null +++ b/.github/workflows/FormatCheck.yml @@ -0,0 +1,41 @@ +name: format-check + +on: + push: + branches: + - 'main' + tags: '*' + pull_request: + +jobs: + check-format: + runs-on: ${{ matrix.os }} + strategy: + matrix: + julia-version: [1] + julia-arch: [x86] + os: [ubuntu-latest] + steps: + - uses: julia-actions/setup-julia@latest + with: + version: ${{ matrix.julia-version }} + + - uses: actions/checkout@v4 + - name: Install JuliaFormatter and format + # This will use the latest version by default but you can set the version like so: + # + # julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version = "0.13.0"))' + run: | + julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter"))' + julia -e 'using JuliaFormatter; format(".")' + - name: Format check + run: | + julia -e ' + out = Cmd(`git diff --name-only`) |> read |> String + if out == "" + exit(0) + else + @error "Some files have not been formatted !!!" + write(stdout, out) + exit(1) + end' \ No newline at end of file diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml new file mode 100644 index 0000000..a780e97 --- /dev/null +++ b/.github/workflows/SpellCheck.yml @@ -0,0 +1,13 @@ +name: Spell Check + +on: [pull_request, workflow_dispatch] + +jobs: + typos-check: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + - name: Check spelling + uses: crate-ci/typos@v1.16.26 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de6f84c..3ed7d99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,11 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} +# needed to allow julia-actions/cache to delete old caches that it has created +permissions: + actions: write + contents: read + jobs: test: if: "!contains(github.event.head_commit.message, 'skip ci')" @@ -67,7 +72,7 @@ jobs: - uses: codecov/codecov-action@v3 with: files: lcov.info - - uses: coverallsapp/github-action@master + - uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: ./lcov.info diff --git a/docs/make.jl b/docs/make.jl index 03bb874..bc59a9f 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,25 +1,23 @@ using TrixiShallowWater using Documenter -DocMeta.setdocmeta!(TrixiShallowWater, :DocTestSetup, :(using TrixiShallowWater); recursive=true) +DocMeta.setdocmeta!(TrixiShallowWater, :DocTestSetup, :(using TrixiShallowWater); + recursive = true) makedocs(; - modules=[TrixiShallowWater], - authors="Andrew R. Winters , Michael Schlottke-Lakemper ", - repo="https://github.com/trixi-framework/TrixiShallowWater.jl/blob/{commit}{path}#{line}", - sitename="TrixiShallowWater.jl", - format=Documenter.HTML(; - prettyurls=get(ENV, "CI", "false") == "true", - canonical="https://trixi-framework.github.io/TrixiShallowWater.jl", - edit_link="main", - assets=String[], - ), - pages=[ - "Home" => "index.md", - ], -) + modules = [TrixiShallowWater], + authors = "Andrew R. Winters , Michael Schlottke-Lakemper ", + repo = "https://github.com/trixi-framework/TrixiShallowWater.jl/blob/{commit}{path}#{line}", + sitename = "TrixiShallowWater.jl", + format = Documenter.HTML(; + prettyurls = get(ENV, "CI", "false") == "true", + canonical = "https://trixi-framework.github.io/TrixiShallowWater.jl", + edit_link = "main", + assets = String[],), + pages = [ + "Home" => "index.md", + ],) deploydocs(; - repo="github.com/trixi-framework/TrixiShallowWater.jl", - devbranch="main", -) + repo = "github.com/trixi-framework/TrixiShallowWater.jl", + devbranch = "main",)