diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1a443c1..e1454e6 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -11,29 +11,11 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - tests-ubuntu: + run-tests: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] - steps: - - uses: actions/checkout@v5 - - uses: DeterminateSystems/nix-installer-action@main - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - uses: cachix/cachix-action@v16 - with: - name: rde - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - extraPullNames: rstats-on-nix, nix-community - - run: nix build . - - run: nix flake check . --all-systems - - run: nix develop -c Rscript test/test.R - test-darwin: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest] + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v5 - uses: DeterminateSystems/nix-installer-action@main diff --git a/flake.nix b/flake.nix index 7a42495..0d28ab4 100644 --- a/flake.nix +++ b/flake.nix @@ -27,28 +27,30 @@ extraRPackages = let fetchfromGitHubJSONFile = path: prev.fetchFromGitHub (builtins.fromJSON (builtins.readFile path)); in { - ## f + ## F fwildclusterboot = prev.rPackages.buildRPackage { name = "fwildclusterboot"; src = fetchfromGitHubJSONFile ./versions/fwildclusterboot.json; - propagatedBuildInputs = builtins.attrValues { - inherit - (prev.rPackages) - collapse - dqrng - dreamerr - Formula - generics - gtools - JuliaConnectoR - Matrix - Rcpp - rlang - summclust - RcppArmadillo - RcppEigen - ; - }; + propagatedBuildInputs = + builtins.attrValues { + inherit + (prev.rPackages) + collapse + dqrng + dreamerr + Formula + generics + gtools + JuliaConnectoR + Matrix + Rcpp + rlang + summclust + RcppArmadillo + RcppEigen + ; + } + ++ [(prev.julia-bin.withPackages ["WildBootTests"])]; }; ## H diff --git a/test/test.R b/test/test.R index 76f3bbe..ff36dc0 100644 --- a/test/test.R +++ b/test/test.R @@ -12,7 +12,23 @@ boot_lm <- boottest( param = "treatment", B = 999 ) +boot_lmjl <- boottest( + lm_fit, + clustid = "group_id1", + param = "treatment", + B = 999, + engine = "WildBootTests.jl" +) +setBoottest_engine("WildBootTests.jl") +boot_lmjl2 <- boottest( + lm_fit, + clustid = "group_id1", + param = "treatment", + B = 999 +) summary(boot_lm) +summary(boot_lmjl) +summary(boot_lmjl2) cat("\n============================================================ httpgd ============================================================\n") library(httpgd)