-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefer
just fmt
and paths-filter over julia-formatter action
- Loading branch information
1 parent
d4c8c74
commit ba9d553
Showing
1 changed file
with
24 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
name: CI | ||
# Run on master, tags, or any pull request | ||
on: | ||
schedule: | ||
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST) | ||
push: | ||
branches: [master] | ||
tags: ["*"] | ||
branches: | ||
- master | ||
tags: ['*'] | ||
pull_request: | ||
|
||
workflow_dispatch: | ||
concurrency: | ||
# Skip intermediate builds: always. | ||
# Cancel intermediate builds: only if it is a pull request build. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
jobs: | ||
test: | ||
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | ||
|
@@ -69,7 +73,21 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@latest | ||
- uses: julia-actions/julia-format@v3 | ||
# https://github.com/FluxML/Flux.jl/blob/7be1ca7a/.github/workflows/JuliaFormatter.yml | ||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: | | ||
julia_file_change: | ||
- added|modified: '**.jl' | ||
- name: Apply JuliaFormatter | ||
if: steps.filter.outputs.julia_file_change == 'true' | ||
run: | | ||
just fmt | ||
- name: Check formatting diff | ||
if: steps.filter.outputs.julia_file_change == 'true' | ||
run: | | ||
git diff --color=always --exit-code | ||
perf: | ||
name: Performance | ||
|