Skip to content

Commit c8b8369

Browse files
authored
Move downstream tests to GitHub CI (#153)
1 parent 9671895 commit c8b8369

File tree

3 files changed

+59
-7
lines changed

3 files changed

+59
-7
lines changed

.github/workflows/Downstream.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Downstream
2+
on:
3+
push:
4+
branches: [master]
5+
tags: [v*]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: ${{ matrix.package.repo }}/${{ matrix.package.group }}
11+
runs-on: ${{ matrix.os }}
12+
env:
13+
GROUP: ${{ matrix.package.group }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
julia-version: [1]
18+
os: [ubuntu-latest]
19+
package:
20+
- {user: JuliaIO, repo: CodecZlib.jl, group: TranscodingStreams}
21+
- {user: JuliaIO, repo: CodecLz4.jl, group: TranscodingStreams}
22+
- {user: JuliaIO, repo: CodecZstd.jl, group: TranscodingStreams}
23+
- {user: JuliaIO, repo: CodecBase.jl, group: TranscodingStreams}
24+
- {user: JuliaIO, repo: CodecXz.jl, group: TranscodingStreams}
25+
- {user: JuliaIO, repo: ZipArchives.jl, group: TranscodingStreams}
26+
- {user: JuliaIO, repo: CodecBzip2.jl, group: TranscodingStreams}
27+
- {user: BioJulia, repo: Automa.jl, group: TranscodingStreams}
28+
- {user: BioJulia, repo: FASTX.jl, group: TranscodingStreams}
29+
- {user: diegozea, repo: MIToS.jl, group: TranscodingStreams}
30+
steps:
31+
- uses: actions/checkout@v2
32+
- uses: julia-actions/setup-julia@v1
33+
with:
34+
version: ${{ matrix.julia-version }}
35+
arch: x64
36+
- uses: julia-actions/julia-buildpkg@latest
37+
- name: Clone Downstream
38+
uses: actions/checkout@v2
39+
with:
40+
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
41+
path: downstream
42+
- name: Load this and run the downstream tests
43+
shell: julia --color=yes --project=downstream {0}
44+
run: |
45+
using Pkg
46+
try
47+
# force it to use this PR's version of the package
48+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
49+
Pkg.update()
50+
Pkg.test() # resolver may fail with test time deps
51+
catch err
52+
err isa Pkg.Resolve.ResolverError || rethrow()
53+
# If we can't resolve that means this is incompatible by SemVer and this is fine.
54+
# It means we marked this as a breaking change, so we don't need to worry about.
55+
# Mistakenly introducing a breaking change, as we have intentionally made one.
56+
@info "Not compatible with this release. No problem." exception=err
57+
exit(0) # Exit immediately, as a success
58+
end

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
2020
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2121

2222
[targets]
23-
test = ["Test", "Pkg", "CodecZlib", "CodecXz", "CodecZstd", "CodecBase"]
23+
test = ["Test"]

test/runtests.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using TranscodingStreams
22
using Test
3-
using Pkg
43

54
if VERSION v"1.1"
65
@test isempty(detect_unbound_args(TranscodingStreams; recursive=true))
@@ -126,8 +125,3 @@ end
126125
include("codecnoop.jl")
127126
include("codecinvalid.jl")
128127
include("codecquadruple.jl")
129-
130-
# Test third-party codec packages.
131-
for pkg in ["CodecZlib", "CodecXz", "CodecZstd", "CodecBase"]
132-
Pkg.test(pkg)
133-
end

0 commit comments

Comments
 (0)