Skip to content

Commit 09004d6

Browse files
authored
Merge branch 'main' into mh/ci
2 parents 4f079bc + ce49deb commit 09004d6

File tree

4 files changed

+48
-6
lines changed

4 files changed

+48
-6
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
matrix:
2121
version:
2222
- '1.0'
23+
- 'lts'
2324
- '1'
25+
- 'pre'
2426
- 'nightly'
2527
os:
2628
- ubuntu-latest

.github/workflows/CompatHelper.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
CompatHelper:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Install CompatHelper"
24+
run: |
25+
import Pkg
26+
name = "CompatHelper"
27+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
28+
version = "3"
29+
Pkg.add(; name, uuid, version)
30+
shell: julia --color=yes {0}
31+
- name: "Run CompatHelper"
32+
run: |
33+
import CompatHelper
34+
CompatHelper.main()
35+
shell: julia --color=yes {0}
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
# This repo uses Documenter, so we can reuse our [Documenter SSH key](https://documenter.juliadocs.org/stable/man/hosting/walkthrough/).
39+
# If we didn't have one of those setup, we could configure a dedicated ssh deploy key `COMPATHELPER_PRIV` following https://juliaregistries.github.io/CompatHelper.jl/dev/#Creating-SSH-Key.
40+
# Either way, we need an SSH key if we want the PRs that CompatHelper creates to be able to trigger CI workflows themselves.
41+
# That is because GITHUB_TOKEN's can't trigger other workflows (see https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow).
42+
# Check if you have a deploy key setup using these docs: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.
43+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
44+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

Project.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ version = "1.2.1"
66
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
77

88
[compat]
9-
DataStructures = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18"
9+
DataStructures = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19"
1010
julia = "1"
1111

1212
[extras]
1313
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
1414
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
15-
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1615
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1716

1817
[targets]
19-
test = ["Aqua", "Random", "StatsBase", "Test"]
18+
test = ["Aqua", "Random", "Test"]

test/runtests.jl

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

65
stable_algorithms = [TimSort, RadixSort, PagedMergeSort]
@@ -81,14 +80,12 @@ Random.seed!(0xdeadbeef)
8180
for n in [0:10..., 100, 101, 1000, 1001]
8281
r = 1:10
8382
v = rand(1:10,n)
84-
h = fit(Histogram, v, r)
8583

8684
for ord in [Base.Order.Forward, Base.Order.Reverse]
8785
# insertion sort (stable) as reference
8886
pi = sortperm(v, alg=InsertionSort, order=ord)
8987
@test isperm(pi)
9088
si = v[pi]
91-
@test fit(Histogram, si, r) == h
9289
@test issorted(si, order=ord)
9390
@test all(issorted,[pi[si.==x] for x in r])
9491
c = copy(v)

0 commit comments

Comments
 (0)