Skip to content

Commit

Permalink
Merge pull request #69 from ArnoStrouwen/test
Browse files Browse the repository at this point in the history
Testing overhaul
  • Loading branch information
ChrisRackauckas authored Jan 7, 2024
2 parents 56d3f77 + 44c8b66 commit 3b833bf
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 33 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,35 @@ on:
- master
paths-ignore:
- 'docs/**'
schedule:
- cron: '57 0 * * 5'
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
group:
- Core
version:
- '1'
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
- uses: actions/cache@v3
env:
cache-name: cache-artifacts
- uses: julia-actions/cache@v1
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
token: ${{ secrets.GITHUB_TOKEN }}
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
GROUP: ${{ matrix.group }}
JULIA_NUM_THREADS: 11
with:
depwarn: error
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
file: lcov.info
file: lcov.info
3 changes: 2 additions & 1 deletion .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
- 'release-'
tags: '*'
pull_request:

schedule:
- cron: '28 12 * * 6'
jobs:
build:
runs-on: ubuntu-latest
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,32 @@ on:
- master
paths-ignore:
- 'docs/**'
schedule:
- cron: '28 12 * * 6'
jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: ['1']
group:
- Core
version:
- '1'
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
- uses: cjdoris/julia-downgrade-compat-action@v1
# if: ${{ matrix.version == '1.6' }}
with:
skip: Pkg,TOML
- uses: julia-actions/cache@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
11 changes: 11 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,16 @@ version = "1.8.0"
StaticArrayInterface = "0d7ed370-da01-4f52-bd93-41d350b8b718"

[compat]
Aqua = "0.8"
SafeTestsets = "0.1"
StaticArrayInterface = "1.2"
Test = "1"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "Test", "SafeTestsets"]
8 changes: 0 additions & 8 deletions test/Project.toml

This file was deleted.

3 changes: 2 additions & 1 deletion test/basic.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

using EllipsisNotation
using StaticArrayInterface
@test isempty(detect_ambiguities(EllipsisNotation))

A = Array{Int}(undef, 2, 4, 2)
Expand Down
1 change: 1 addition & 0 deletions test/cartesian.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using EllipsisNotation
@testset "CartesianIndex" begin
A = rand(4, 4, 4, 4, 4)
@test A[.., 1, 2, 3] == A[.., CartesianIndex(1, 2, 3)]
Expand Down
1 change: 1 addition & 0 deletions test/more_generic.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using EllipsisNotation
B = Array{Int}(undef, 2, 3, 4, 5, 6)

n = 0
Expand Down
12 changes: 5 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using StaticArrayInterface
using EllipsisNotation
using Test
using SafeTestsets

include("qa.jl")
include("basic.jl")
include("more_generic.jl")
include("cartesian.jl")
@time @safetestset "Quality Assurance" include("qa.jl")
@time @safetestset "Basic Tests" include("basic.jl")
@time @safetestset "Generic Tests" include("more_generic.jl")
@time @safetestset "Cartesian Tests" include("cartesian.jl")

0 comments on commit 3b833bf

Please sign in to comment.