47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Test
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: arch-latest
|
|
|
|
steps:
|
|
#- name: Get git-lfs
|
|
# run: apt-get update && apt-get install git-lfs
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
#- name: Checkout LFS objects
|
|
# run: git lfs checkout
|
|
|
|
- name: Setup Julia environment
|
|
uses: https://github.com/julia-actions/setup-julia@v1.9.2
|
|
with:
|
|
version: '1.9.2'
|
|
|
|
- name: Install dependencies
|
|
run: julia --project=./ -e 'import Pkg; Pkg.instantiate()'
|
|
|
|
- name: Format check
|
|
run: |
|
|
julia --project=./ -e 'using JuliaFormatter; format(".", verbose=true)'
|
|
julia --project=./ -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'
|
|
|
|
- name: Run tests
|
|
run: julia --project=./ -t 4 -e 'import Pkg; Pkg.test()' -O0
|
|
|
|
- name: Run examples
|
|
run: julia --project=examples/ -t 4 -e 'import Pkg; Pkg.develop(Pkg.PackageSpec(path=pwd())); Pkg.instantiate(); include("examples/import_bench.jl")' -O3
|