Add steps to check out default.nix files #1491
This file contains hidden or 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
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
name: devtools-tests-via-r-nix | |
permissions: | |
contents: read | |
jobs: | |
devtools_test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create this folder to silence warning | |
run: mkdir -p ~/.nix-defexpr/channels | |
- name: Create .Renviron | |
run: | | |
echo "GITHUB_PAT=${{ secrets.GITHUB_TOKEN }}" >> ~/.Renviron | |
shell: bash | |
- uses: cachix/install-nix-action@v31 | |
with: | |
nix_path: nixpkgs=https://github.com/rstats-on-nix/nixpkgs/archive/refs/heads/r-daily.tar.gz | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: rstats-on-nix | |
- name: Build dev-env | |
run: nix-shell --quiet --pure -p cacert nix R rPackages.covr rPackages.codetools rPackages.xml2 rPackages.sys rPackages.devtools --run "Rscript -e \"sessionInfo()\"" | |
- name: devtools::test() via nix-shell | |
run: nix-shell --quiet --pure -p cacert nix R rPackages.covr rPackages.codetools rPackages.xml2 rPackages.sys rPackages.devtools --run "Rscript -e \"devtools::test(stop_on_failure = TRUE)\"" | |