-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
113 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: CI-JutulDarcyAD | ||
|
||
on: | ||
# Trigger the workflow on push to main or pull request | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
matrix: | ||
version: | ||
- '1.7' | ||
|
||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
arch: | ||
- x64 | ||
|
||
steps: | ||
- name: Checkout JutulDarcyAD | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup julia | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ matrix.version }} | ||
arch: ${{ matrix.arch }} | ||
|
||
- name: Build | ||
uses: julia-actions/julia-buildpkg@latest | ||
|
||
- name: Run tests | ||
uses: julia-actions/julia-runtest@latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@testset "Test jutulForce" begin | ||
|
||
d = (1.0, 20.0, 3.0) | ||
inj_loc = (3, 1, 9) .* d | ||
prod_loc = (28, 1, 9) .* d | ||
irate = rand() | ||
q = jutulForce(irate, [inj_loc, prod_loc]) | ||
q1 = jutulForce([irate, -irate], [inj_loc, prod_loc]) | ||
@test q == q1 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@testset "Test jutulModel" begin | ||
|
||
@info "set up model" | ||
n = (rand(3:5), rand(3:5), rand(3:5)) | ||
d = 10 .* (rand(), rand(), rand()) | ||
K = 200 * rand() * md * ones(n) | ||
ϕ = rand() | ||
model = jutulModel(n, d, ϕ, K1to3(K)) | ||
|
||
@test model.n == n | ||
@test model.d == d | ||
@test model.ϕ == ϕ | ||
@test model.K == K1to3(K) | ||
|
||
model1 = jutulModel(n, d, ϕ, K1to3(K)) | ||
@test model1 == model | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters