From 0d6142cac7b152a3196cde3527c114f34e1f1516 Mon Sep 17 00:00:00 2001 From: June Choe Date: Wed, 26 Jul 2023 11:30:07 +0900 Subject: [PATCH] julia styler gha --- .github/workflows/julia-style.yaml | 34 +++++++++++++++++++ .../workflows/{style.yaml => r-style.yaml} | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/julia-style.yaml rename .github/workflows/{style.yaml => r-style.yaml} (99%) diff --git a/.github/workflows/julia-style.yaml b/.github/workflows/julia-style.yaml new file mode 100644 index 0000000..cd743e1 --- /dev/null +++ b/.github/workflows/julia-style.yaml @@ -0,0 +1,34 @@ +name: Julia-Style +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +on: + push: + branches: + - 'main' + tags: '*' + pull_request: + types: [opened, synchronize, reopened, ready_for_review] +jobs: + format-check: + name: Style Enforcement (Julia ${{ matrix.julia-version }} - ${{ github.event_name }}) + # Run on push's or non-draft PRs + if: (github.event_name == 'push') || (github.event.pull_request.draft == false) + runs-on: ubuntu-latest + strategy: + matrix: + julia-version: [1.6] + steps: + - uses: julia-actions/setup-julia@latest + with: + version: ${{ matrix.julia-version }} + - uses: actions/checkout@v1 + - name: Instantiate `format` environment and format + run: | + julia --project=format -e 'using Pkg; Pkg.instantiate()' + julia --project=format 'format/run.jl' + - uses: reviewdog/action-suggester@v1 + if: github.event_name == 'pull_request' + with: + tool_name: JuliaFormatter + fail_on_error: true diff --git a/.github/workflows/style.yaml b/.github/workflows/r-style.yaml similarity index 99% rename from .github/workflows/style.yaml rename to .github/workflows/r-style.yaml index bee3e48..dfdabed 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/r-style.yaml @@ -4,7 +4,7 @@ on: push: paths: ["**.[rR]", "**.[qrR]md", "**.[rR]markdown", "**.[rR]nw", "**.[rR]profile"] -name: Style +name: R-Style jobs: style: