Update .gitea/workflows/julia-test.yml
Some checks failed
CI Demo / build (push) Successful in 3s
Docker Test / docker-ops (push) Successful in 5s
Go Test / go-test (push) Has been cancelled
.NET Test / dotnet-test (push) Has been cancelled
Java Test / java-hello (push) Has been cancelled
Kotlin Test / kotlin-hello (push) Has been cancelled
Node.js Test / nodejs-test (push) Has been cancelled
Notebook Test / nb-test (push) Has been cancelled
PHP Test / php-test (push) Has been cancelled
R Test / r-cmdcheck (push) Has been cancelled
Rust Test / rust-test (push) Has been cancelled
Scala Test / scala-test (push) Has been cancelled
Swift Test / swift-hello (push) Has been cancelled
Python Test / python-hello (push) Has been cancelled

This commit is contained in:
2025-08-07 19:19:32 +00:00
parent df9454e640
commit f264509b7a

View File

@@ -10,12 +10,36 @@ jobs:
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: '1.9'
version: '1.10' # stable; 1.9 is fine too
- name: Install dependencies
- name: Install dependencies (if Project.toml exists)
run: |
julia -e 'using Pkg; Pkg.instantiate()'
if [ -f Project.toml ]; then
julia -e 'using Pkg; Pkg.instantiate()'
else
echo "No Project.toml found; will create a minimal project for testing."
fi
- name: Run tests
- name: Run tests or Hello
run: |
julia -e 'using Pkg; Pkg.test()'
if [ -f Project.toml ]; then
# Activate the repo project and run its tests
julia -e 'using Pkg; Pkg.activate("."); Pkg.test()'
else
# Create a tiny project + test so the job still proves the runner works
mkdir -p test
cat > Project.toml <<'EOF'
name = "HelloCI"
uuid = "f0f9c0b0-0000-4e00-9000-000000000001"
version = "0.1.0"
[deps]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
EOF
cat > test/runtests.jl <<'EOF'
using Test
@test 2 + 2 == 4
println("Hello, Julia!")
EOF
julia -e 'using Pkg; Pkg.activate("."); Pkg.test()'
fi