Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/test-broken.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run broken tests

on:
push:
branches:
- master
tags: '*'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: ['nightly']
fail-fast: false
name: Broken test Julia ${{ matrix.julia-version }}
steps:
- uses: actions/checkout@v2
- name: Setup julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
# Use `JULIA_PKG_SERVER` mitigation implemented in julia-buildpkg:
- uses: julia-actions/julia-buildpkg@v1

# Maybe some useful information:
- run: julia -e 'using InteractiveUtils; versioninfo()'
- run: lscpu

- uses: julia-actions/julia-runtest@v1
id: test
env:
CI: "false"
continue-on-error: true
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run tests

on:
push:
branches:
- master
tags: '*'
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: ['1.6', 'nightly']
fail-fast: false
name: Test Julia ${{ matrix.julia-version }}
steps:
- uses: actions/checkout@v2
- name: Setup julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
# Use `JULIA_PKG_SERVER` mitigation implemented in julia-buildpkg:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: ./lcov.info
flags: unittests
name: codecov-umbrella
8 changes: 1 addition & 7 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,4 @@ authors = ["Takafumi Arakaki <aka.tkf@gmail.com> and contributors"]
version = "0.1.0"

[compat]
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
julia = "1.6"
4 changes: 4 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[deps]
BangBang = "198e06fe-97b7-11e9-32a5-e1d131e6ad66"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
11 changes: 11 additions & 0 deletions test/load.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
try
using ConcurrentCollectionsBenchmarks
true
catch
false
end || begin
let path = joinpath(@__DIR__, "../benchmark/ConcurrentCollectionsBenchmarks/Project.toml")
path in LOAD_PATH || push!(LOAD_PATH, path)
end
using ConcurrentCollectionsBenchmarks
end
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module TestConcurrentCollections
using Test

include("load.jl")

@testset "$file" for file in sort([
file for file in readdir(@__DIR__) if match(r"^test_.*\.jl$", file) !== nothing
])
Expand Down
14 changes: 12 additions & 2 deletions test/test_dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ using ConcurrentCollections
using ConcurrentCollections.Implementations: clusters
using Test

const IS_CI = lowercase(get(ENV, "CI", "false")) == "true"

@testset for npairs in [2, 100]
@testset for Key in [Int8, Int32, Int64], Value in [Int]
d = ConcurrentDict{Key,Value}()
Expand Down Expand Up @@ -50,7 +52,11 @@ using Test
end

@testset "clusters" begin
@test length(clusters(d)::Vector{UnitRange{Int}}) > 0
if VERSION >= v"1.7-" && IS_CI
@info "skipping `clusters` (known bug)"
else
@test length(clusters(d)::Vector{UnitRange{Int}}) > 0
end
end
end

Expand Down Expand Up @@ -78,7 +84,11 @@ using Test
@test "001" ∉ sort!(collect(keys(d)))
end
@testset "clusters" begin
@test length(clusters(d)::Vector{UnitRange{Int}}) > 0
if VERSION >= v"1.7-" && IS_CI
@info "skipping `clusters` (known bug)"
else
@test length(clusters(d)::Vector{UnitRange{Int}}) > 0
end
end
end
end
Expand Down