Skip to content

Commit de1b00c

Browse files
committed
Add downstream tests
1 parent ad7a3bd commit de1b00c

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.github/workflows/Downstream.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Downstream
2+
on:
3+
push:
4+
branches: [master, develop]
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: BioJulia, repo: BED.jl, group: Indexes}
21+
- {user: BioJulia, repo: GFF3.jl, group: Indexes}
22+
- {user: BioJulia, repo: XAM.jl, group: Indexes}
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: julia-actions/setup-julia@v1
26+
with:
27+
version: ${{ matrix.julia-version }}
28+
arch: x64
29+
- uses: julia-actions/julia-buildpkg@latest
30+
- name: Clone Downstream
31+
uses: actions/checkout@v2
32+
with:
33+
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
34+
path: downstream
35+
- name: Load this and run the downstream tests
36+
shell: julia --color=yes --project=downstream {0}
37+
run: |
38+
using Pkg
39+
try
40+
# force it to use this PR's version of the package
41+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
42+
Pkg.update()
43+
Pkg.test() # resolver may fail with test time deps
44+
catch err
45+
err isa Pkg.Resolve.ResolverError || rethrow()
46+
# If we can't resolve that means this is incompatible by SemVer and this is fine.
47+
# It means we marked this as a breaking change, so we don't need to worry about.
48+
# Mistakenly introducing a breaking change, as we have intentionally made one.
49+
@info "Not compatible with this release. No problem." exception=err
50+
exit(0) # Exit immediately, as a success
51+
end

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Indexes is tested against Julia `1.X` on Linux, OS X, and Windows.
3434
**Latest build status:**
3535

3636
[![Unit Tests](https://github.com/BioJulia/Indexes.jl/actions/workflows/UnitTests.yml/badge.svg)](https://github.com/BioJulia/Indexes.jl/actions/workflows/UnitTests.yml)
37+
[![Downstream](https://github.com/BioJulia/Indexes.jl/actions/workflows/Downstream.yml/badge.svg)](https://github.com/BioJulia/Indexes.jl/actions/workflows/Downstream.yml)
3738
[![Build Documentation](https://github.com/BioJulia/Indexes.jl/actions/workflows/Documentation.yml/badge.svg)](https://github.com/BioJulia/Indexes.jl/actions/workflows/Documentation.yml)
3839
[![codecov](https://codecov.io/gh/BioJulia/Indexes.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/Indexes.jl)
3940

docs/src/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Indexes is tested against Julia `1.X` on Linux, OS X, and Windows.
3232
**Latest build status:**
3333

3434
[![Unit Tests](https://github.com/BioJulia/Indexes.jl/actions/workflows/UnitTests.yml/badge.svg)](https://github.com/BioJulia/Indexes.jl/actions/workflows/UnitTests.yml)
35+
[![Downstream](https://github.com/BioJulia/Indexes.jl/actions/workflows/Downstream.yml/badge.svg)](https://github.com/BioJulia/Indexes.jl/actions/workflows/Downstream.yml)
3536
[![Build Documentation](https://github.com/BioJulia/Indexes.jl/actions/workflows/Documentation.yml/badge.svg)](https://github.com/BioJulia/Indexes.jl/actions/workflows/Documentation.yml)
3637
[![codecov](https://codecov.io/gh/BioJulia/Indexes.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BioJulia/Indexes.jl)
3738

0 commit comments

Comments
 (0)