diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d332b11..40e9d38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: strategy: matrix: version: + - '1.6' - '1' - 'nightly' os: @@ -32,6 +33,6 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v2 with: - file: lcov.info + files: lcov.info diff --git a/LICENSE b/LICENSE index c258f94..dc3034d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Fredrik Ekre +Copyright (c) 2021-2022 Fredrik Ekre Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index fc357b8..91609f6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # TeeStreams +[![CI][gh-actions-img]][gh-actions-url] +[![codecov][codecov-img]][codecov-url] + Simplify writing to multiple streams at once. ## Usage @@ -68,3 +71,10 @@ expected_shasum = "f190c938dd6fed97021953240523c9db448ec0a6760b574afd4e9924ab561 download_verify(url, expected_shasum) ``` + + +[gh-actions-img]: https://github.com/fredrikekre/TeeStreams.jl/actions/workflows/ci.yml/badge.svg?branch=master&event=push +[gh-actions-url]: https://github.com/fredrikekre/TeeStreams.jl/actions/workflows/ci.yml + +[codecov-img]: https://codecov.io/gh/fredrikekre/TeeStreams.jl/branch/master/graph/badge.svg?token=K7C8OASVZR +[codecov-url]: https://codecov.io/gh/fredrikekre/TeeStreams.jl diff --git a/src/TeeStreams.jl b/src/TeeStreams.jl index 42c5e38..5983c29 100644 --- a/src/TeeStreams.jl +++ b/src/TeeStreams.jl @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: MIT + module TeeStreams export TeeStream diff --git a/test/runtests.jl b/test/runtests.jl index 5c48a3f..e163570 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: MIT + using TeeStreams, Test, SimpleBufferStream, HTTP, CodecZlib, CodecZstd, SHA, Tar @@ -35,11 +37,12 @@ end bs = BufferStream() tee = TeeStream(iob, ioc, iof, bs) write_things(tee) + flush(tee) close(iof); close(bs) @test String(take!(iob)) == String(take!(ioc.io)) == read(f, String) == read(bs, String) == correct + close(tee) try - close(tee) write_things(tee) catch err @test err isa CompositeException @@ -57,6 +60,7 @@ end @test isopen(io2) TeeStream(io1, io2) do tee write_things(tee) + flush(tee) end @test !isopen(io1) @test !isopen(io2)