Skip to content

Commit 9b4ff8f

Browse files
Run CSV.jl integration tests on CI (#61)
1 parent 1e2218a commit 9b4ff8f

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/IntegrationTest.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: IntegrationTest
2+
on:
3+
push:
4+
branches: [main]
5+
tags: [v*]
6+
pull_request:
7+
8+
concurrency:
9+
# Skip intermediate builds: always.
10+
# Cancel intermediate builds: only if it is a pull request build.
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
13+
14+
jobs:
15+
test:
16+
name: ${{ matrix.package.repo }}
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
julia-version: [1]
22+
os: [ubuntu-latest]
23+
package:
24+
- {user: JuliaData, repo: CSV.jl}
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: julia-actions/setup-julia@v1
29+
with:
30+
version: ${{ matrix.julia-version }}
31+
arch: x64
32+
- uses: julia-actions/julia-buildpkg@latest
33+
- name: Clone Downstream
34+
uses: actions/checkout@v2
35+
with:
36+
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
37+
path: downstream
38+
- name: Load this and run the downstream tests
39+
shell: julia --project=downstream {0}
40+
run: |
41+
using Pkg
42+
try
43+
# Force downstream tests to use this PR's version of the package.
44+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
45+
Pkg.update()
46+
Pkg.test() # resolver may fail with test time deps
47+
catch err
48+
err isa Pkg.Resolve.ResolverError || rethrow()
49+
# If we can't resolve that means this is incompatible by SemVer and this is fine;
50+
# it means we marked this as a breaking change, so we don't need to worry about
51+
# mistakenly introducing a breaking change, as we have intentionally made one
52+
@info "Not compatible with this release. No problem." exception=err
53+
exit(0) # Exit immediately as a success.
54+
end

0 commit comments

Comments
 (0)