Skip to content

Commit

Permalink
Add some workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 29, 2023
1 parent 657c549 commit d1330dd
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,8 @@ jobs:
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
julia -e 'using JuliaFormatter; format(".", verbose=true)'
- 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'
- uses: reviewdog/action-suggester@v1
with:
tool_name: JuliaFormatter
fail_on_error: true
filter_mode: added
34 changes: 34 additions & 0 deletions .github/workflows/VersionVigilante.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: VersionVigilante

on: pull_request

jobs:
VersionVigilante:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
- name: VersionVigilante.main
id: versionvigilante_main
run: |
using Pkg
Pkg.add("VersionVigilante")
using VersionVigilante
VersionVigilante.main("https://github.com/${{ github.repository }}", master_branch="main")
shell: julia {0}
- name: ✅ Un-Labeller (if success)
if: (steps.versionvigilante_main.outputs.compare_versions == 'success') && (success() || failure())
continue-on-error: true
uses: actions/github-script@v6.4.1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.removeLabel({...context.issue, name: 'needs version bump'})
- name: ❌ Labeller (if failure)
if: (steps.versionvigilante_main.outputs.compare_versions == 'failure') && (success() || failure())
continue-on-error: true
uses: actions/github-script@v6.4.1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.addLabels({...context.issue, labels: ['needs version bump']})

0 comments on commit d1330dd

Please sign in to comment.