Skip to content

Commit

Permalink
Move CI and Smoke Tests for Third Party Github Actions & Resolve Some…
Browse files Browse the repository at this point in the history
… Issues (#316)
  • Loading branch information
bburns632 authored Apr 17, 2024
1 parent 3e97884 commit 1fc499b
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 197 deletions.
22 changes: 0 additions & 22 deletions .github/setup.sh

This file was deleted.

21 changes: 11 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
r-version: 'release'
steps:
- name: checkout repository
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Tidy Ubuntu
Expand All @@ -35,18 +35,19 @@ jobs:
r-version: ${{ matrix.r-version }}
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-tinytex@v2
- name: set up dependencies
shell: bash
env:
OS_NAME: ${{ matrix.os }}
run: $GITHUB_WORKSPACE/.github/setup.sh
- name: run tests
shell: bash
run: $GITHUB_WORKSPACE/test.sh
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::covr
needs: check
- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--as-cran")'
error-on: '"warning"'
check-dir: '"check"'
- name: upload coverage
if: ${{ matrix.os == 'macos-latest' && matrix.r-version == 'release' }}
shell: Rscript {0}
run: covr::codecov()
run: covr::codecov(token = "${{ secrets.CODECOV_TOKEN }}")
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
all-successful:
runs-on: ubuntu-latest
Expand Down
93 changes: 80 additions & 13 deletions .github/workflows/smoke-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,89 @@ jobs:
test:
name: smoke-tests
runs-on: ubuntu-latest
env:
PKGNET_SUPPRESS_BROWSER: 0
strategy:
fail-fast: false
matrix:
test_pkg:
- askpass
- assertthat
- base64enc
- bslib
- cachem
- cli
- covr
- cpp11
- crayon
- crosstalk
- curl
- data.table
- digest
- DT
- evaluate
- fastmap
- fontawesome
- formatR
- fs
- futile.logger
- futile.options
- glue
- highr
- htmltools
- htmlwidgets
- httpuv
- httr
- igraph
- jquerylib
- jsonlite
- knitr
- lambda.r
- later
- lazyeval
- lifecycle
- magrittr
- memoise
- mime
- openssl
- pkgconfig
- promises
- R6
- rappdirs
- Rcpp
- rex
- rlang
- rmarkdown
- sass
- sys
- tinytex
- vctrs
- visNetwork
- withr
- xfun
- yaml
steps:
- name: Checkout repository
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- name: Install Tidy
run: sudo apt install -y tidy
- name: set up R
shell: bash
run: |
export GITHUB_ACTIONS="true"
${GITHUB_WORKSPACE}/smoke_tests/setup.sh
- name: run smoke tests
shell: bash
run: |
R CMD INSTALL .
TEST_DATA_DIR=$(pwd)/smoke_tests/test_data
NUM_PARALLEL=4
${GITHUB_WORKSPACE}/smoke_tests/test.sh ${TEST_DATA_DIR} ${NUM_PARALLEL}
- name: Install Deps For Pkgnet & ${{ matrix.test_pkg }}
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: ${{ matrix.test_pkg }}, local::.
- name: run smoke test
shell: Rscript {0}
run: "pkgnet::CreatePackageReport(pkg_name='${{ matrix.test_pkg }}', report_path='${{ github.workspace }}/${{ matrix.test_pkg }}_report.html')"
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
all-successful:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Note that all smoke tests succeeded
run: echo "🚫🔥==🐻👍🏼👍🏼"
40 changes: 0 additions & 40 deletions smoke_tests/setup.sh

This file was deleted.

112 changes: 0 additions & 112 deletions smoke_tests/test.sh

This file was deleted.

Empty file removed smoke_tests/test_data/.gitkeep
Empty file.

0 comments on commit 1fc499b

Please sign in to comment.