Skip to content

Commit

Permalink
Smoke Test: Add R dependencies (#3860)
Browse files Browse the repository at this point in the history
### Intent

Addresses #3844 

Switches workflow to use a single source of truth for R dependencies
from the qa-example-content repo.

### Approach

Updated Github action to install R dependencies from DESCRIPTION file.

Updated README with new instructions.

### QA Notes

Smoke tests pass using new method.
  • Loading branch information
jonvanausdeln authored Jul 5, 2024
1 parent d8da3ec commit 074f4d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/positron-full-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
run: |
curl -Ls https://github.com/r-lib/rig/releases/download/latest/rig-linux-"$(arch)"-latest.tar.gz | $(which sudo) tar xz -C /usr/local
rig add 4.4.0
Rscript -e "install.packages(c('arrow', 'connections', 'RSQLite', 'readxl', 'lubridate'))"
curl https://raw.githubusercontent.com/posit-dev/qa-example-content/main/DESCRIPTION --output DESCRIPTION
Rscript -e "pak::local_install_dev_deps(ask = FALSE)"
- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -119,6 +120,7 @@ jobs:

- name: Set TestRail Run Title
id: set-testrail-run-title
if: always()
run: echo "TESTRAIL_TITLE=$(date +'%Y-%m-%d') Smoke Tests" >> $GITHUB_ENV

- name: Upload Test Results to TestRail
Expand Down
5 changes: 4 additions & 1 deletion test/smoke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ python -m pip install matplotlib ipykernel
The current commands for R packages:

```
Rscript -e "install.packages(c('arrow', 'connections', 'RSQLite', 'readxl', 'lubridate'))"
curl https://raw.githubusercontent.com/posit-dev/qa-example-content/main/DESCRIPTION --output DESCRIPTION
Rscript -e "pak::local_install_dev_deps(ask = FALSE)"
```

## Build step
Expand All @@ -158,6 +159,8 @@ Before any of the tests start executing the test framework clones down the [QA C

For Python, add any package requirements to the `requirements.txt` file in the root of the [QA Content Examples](https://github.com/posit-dev/qa-example-content) repo. We generally do NOT pin them to a specific version, as test can be run against different versions of python and conflicts could arise. If this becomes a problem, we can revisit this mechanism.

For R, add any package requirements to the "imports" section of the `DESCRIPTION` file in the root of the [QA Content Examples](https://github.com/posit-dev/qa-example-content) repo.

## Running tests

Once you have the build watcher running you can run the smoke tests with the debug action `Launch Smoke Test`. (It's near the bottom of the debug dropdown.)
Expand Down

0 comments on commit 074f4d9

Please sign in to comment.