Skip to content

Commit 229da57

Browse files
committed
Fix CI scripts and test UUID
1 parent 38dae7b commit 229da57

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.ci/change-uuid.jl

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
using UUIDs
2+
3+
project_filename = joinpath(dirname(@__DIR__), "Project.toml")
4+
5+
write("Project.toml", replace(read("Project.toml", String), r"uuid = .*?\n" =>"uuid = \"$(uuid4())\"\n"))

.github/workflows/ci.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ jobs:
4343
${{ runner.os }}-test-${{ env.cache-name }}-
4444
${{ runner.os }}-test-
4545
${{ runner.os }}-
46+
- run: julia --color=yes test/libcurl_uuid.jl
47+
- run: julia --color=yes .ci/change-uuid.jl
4648
- uses: julia-actions/julia-buildpkg@v1
47-
- name: Run tests
48-
run: |
49-
julia --project --color=yes -e 'using UUIDs; write("Project.toml", replace(read("Project.toml", String), r"uuid = .*?\n" =>"uuid = \"$(uuid4())\"\n"));'
50-
julia --project --color=yes --check-bounds=yes -e 'import Pkg; Pkg.build(); Pkg.test(; coverage=true)'
49+
- uses: julia-actions/julia-runtest@v1
5150
- uses: julia-actions/julia-processcoverage@v1
5251
- uses: codecov/codecov-action@v1
5352
with:

test/libcurl_uuid.jl

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Pkg
2+
using Test
3+
4+
@testset "LibCURL UUID" begin
5+
project_filename = joinpath(dirname(@__DIR__), "Project.toml")
6+
project = Pkg.TOML.parsefile(project_filename)
7+
uuid = project["uuid"]
8+
correct_uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
9+
@test uuid == correct_uuid
10+
end

0 commit comments

Comments
 (0)