Skip to content

Commit

Permalink
Update tests and compat, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
bclyons12 committed Jul 18, 2024
1 parent 575dc12 commit 88b9cf4
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 9 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.x"
os:
- ubuntu-latest
arch:
- x64

steps:
- uses: actions/checkout@v4

- uses: julia-actions/setup-julia@latest

- uses: julia-actions/cache@v1

- name: Add FuseRegistry
run: |
rm -rf ~/.julia/registries/FuseRegistry
julia -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git")); Pkg.Registry.add("General"); Pkg.Registry.update()'
- name: Replace [email protected] with https in Package.toml files
run: |
find ~/.julia/registries/FuseRegistry -type f -name 'Package.toml' -exec sed -i 's|[email protected]:|https://project-torrey-pines:${{secrets.PTP_READ_TOKEN}}@github.com/|g' {} +
- name: Install dependencies
run: |
julia --project=docs -e '
using Pkg
Pkg.activate("docs")
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
'
- uses: julia-actions/julia-buildpkg@v1

- uses: julia-actions/julia-runtest@v1
10 changes: 2 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
name = "FuseUtils"
uuid = "c8e4ee58-0bec-4a6a-b552-9dd24d6374ac"
authors = ["Brendan Lyons <[email protected]> and contributors"]
version = "1.0.1"
version = "1.0.2"

[compat]
julia = "1.6.7"

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

[targets]
test = ["Test"]
julia = "1"
3 changes: 3 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[deps]
FuseUtils = "c8e4ee58-0bec-4a6a-b552-9dd24d6374ac"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
5 changes: 4 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ using FuseUtils
using Test

@testset "FuseUtils.jl" begin
# Write your tests here.
N = 1000
x = range(0, 1, N + 1)
@test isapprox(trapz(x, x .^ 2), 1.0 / 3.0; rtol=1e-5)
@test isapprox(cumtrapz(x, x .^ 2)[(N ÷ 2) + 1], 0.125 / 3.0; rtol=1e-5)
end

0 comments on commit 88b9cf4

Please sign in to comment.