Skip to content

Commit

Permalink
updated actions further
Browse files Browse the repository at this point in the history
  • Loading branch information
ThummeTo committed Aug 19, 2024
1 parent 2a4b0c1 commit a5e2f1f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
Pkg.instantiate();
Pkg.add("Test");
Pkg.add(path="./PkgEval.jl")'
julia --project=. ./test/FMI2/eval.jl
julia --project=. ./test/eval.jl
36 changes: 7 additions & 29 deletions .github/workflows/Formatter.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,14 @@
name: Formatter

name: Format suggestions
on:
pull_request:
push:
branches:
- 'main'
tags: '*'

# this argument is not required if you don't use the `suggestion-label` input
types: [ opened, reopened, synchronize, labeled, unlabeled ]
jobs:
build:
code-style:
runs-on: ubuntu-latest
steps:
- name: "Check out repository"
uses: actions/checkout@v4

- name: "Set up Julia"
uses: julia-actions/setup-julia@v2
- uses: julia-actions/julia-format@v3
with:
version: '1'
arch: x64
version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1')
suggestion-label: 'format-suggest' # leave this unset or empty to show suggestions for all PRs

- name: Install JuliaFormatter and format
run: julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter")); using JuliaFormatter; format(".", verbose=true)'

- name: Format check
run: |
julia -e '
out = Cmd(`git diff`) |> read |> String
if out == ""
exit(0)
else
@error "Some files are not formatted! Please use the SciMLStyle to format your files!"
write(stdout, out)
exit(1)
end'
3 changes: 1 addition & 2 deletions test/sim_CS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,4 @@ end
# reference values from Simulation in Dymola2020x (Dassl, default settings)
@test [solution.values.saveval[1]...] == [0.5, 0.0]
@test sum(abs.([solution.values.saveval[end]...] - [0.613371, 0.188633])) < 0.2
unloadFMU(fmu)

unloadFMU(fmu)

0 comments on commit a5e2f1f

Please sign in to comment.