Update TagBot.yml #56
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Style-Enforcer | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: '*' | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
# note: keep in sync with `format/run.jl` | |
paths-ignore: | |
- 'README.md' | |
- '.gitignore' | |
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 | |
# TODO: further restrict this | |
permissions: write-all | |
strategy: | |
matrix: | |
julia-version: [1.6] | |
steps: | |
- uses: julia-actions/setup-julia@latest | |
with: | |
version: ${{ matrix.julia-version }} | |
- uses: actions/checkout@v3 | |
- name: Instantiate `format` environment and format | |
run: | | |
julia -e' | |
using Pkg; Pkg.activate() | |
Pkg.add("JuliaFormatter") | |
using JuliaFormatter | |
format(".", YASStyle())' | |
- uses: reviewdog/action-suggester@v1 | |
if: github.event_name == 'pull_request' | |
with: | |
tool_name: JuliaFormatter | |
fail_on_error: true |