Skip to content

Commit 1b8c2ce

Browse files
authored
Add downstream tests (#58)
1 parent 22571be commit 1b8c2ce

File tree

3 files changed

+85
-5
lines changed

3 files changed

+85
-5
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
version:
23-
- '1.0'
23+
- 'lts'
2424
- '1'
2525
os:
2626
- ubuntu-latest
@@ -49,4 +49,6 @@ jobs:
4949
- uses: julia-actions/julia-processcoverage@v1
5050
- uses: codecov/codecov-action@v5
5151
with:
52-
file: lcov.info
52+
token: ${{ secrets.CODECOV_TOKEN }}
53+
files: lcov.info
54+

.github/workflows/downstream.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: IntegrationTest
2+
3+
concurrency:
4+
group: build-${{ github.event.pull_request.number || github.ref }}-${{ github.workflow }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches: [master]
10+
tags: [v*]
11+
paths-ignore:
12+
- 'LICENSE.md'
13+
- 'README.md'
14+
- '.github/workflows/TagBot.yml'
15+
pull_request:
16+
paths-ignore:
17+
- 'LICENSE'
18+
- 'README.md'
19+
- '.github/workflows/TagBot.yml'
20+
21+
jobs:
22+
pre_job:
23+
# continue-on-error: true # Uncomment once integration is finished
24+
runs-on: ubuntu-latest
25+
# Map a step output to a job output
26+
outputs:
27+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
28+
steps:
29+
- id: skip_check
30+
uses: fkirc/skip-duplicate-actions@v5
31+
test:
32+
needs: pre_job
33+
if: needs.pre_job.outputs.should_skip != 'true'
34+
name: ${{ matrix.package.group }}/${{ matrix.package.repo }}/${{ matrix.julia-version }}
35+
runs-on: ${{ matrix.os }}
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
julia-version: ['1']
40+
os: [ubuntu-latest]
41+
package:
42+
- {repo: InfiniteArrays.jl, group: JuliaArrays}
43+
- {repo: InfiniteLinearAlgebra.jl, group: JuliaLinearAlgebra}
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: julia-actions/setup-julia@v2
48+
with:
49+
version: ${{ matrix.julia-version }}
50+
arch: x64
51+
- uses: julia-actions/julia-buildpkg@latest
52+
- name: Clone Downstream
53+
uses: actions/checkout@v4
54+
with:
55+
repository: ${{ matrix.package.group }}/${{ matrix.package.repo }}
56+
path: downstream
57+
- name: Load this and run the downstream tests
58+
shell: julia --color=yes --project=downstream {0}
59+
run: |
60+
using Pkg
61+
try
62+
# force it to use this PR's version of the package
63+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
64+
Pkg.update()
65+
Pkg.test(; coverage = true) # resolver may fail with test time deps
66+
catch err
67+
err isa Pkg.Resolve.ResolverError || rethrow()
68+
# If we can't resolve that means this is incompatible by SemVer and this is fine
69+
# It means we marked this as a breaking change, so we don't need to worry about
70+
# Mistakenly introducing a breaking change, as we have intentionally made one
71+
@info "Not compatible with this release. No problem." exception=err
72+
exit(0) # Exit immediately, as a success
73+
end
74+
- uses: julia-actions/julia-processcoverage@v1
75+
- uses: codecov/codecov-action@v5
76+
with:
77+
token: ${{ secrets.CODECOV_TOKEN }}
78+
files: lcov.info

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ version = "0.1.8"
55

66
[compat]
77
Aqua = "0.8"
8-
Base64 = "<0.0.1, 1"
9-
Test = "<0.0.1, 1"
10-
julia = "1"
8+
Base64 = "1"
9+
Test = "1"
10+
julia = "1.10"
1111

1212
[extras]
1313
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"

0 commit comments

Comments
 (0)