diff --git a/.github/workflows/admiral.yml b/.github/workflows/admiral.yml index e87c518..b04eeeb 100644 --- a/.github/workflows/admiral.yml +++ b/.github/workflows/admiral.yml @@ -53,6 +53,27 @@ jobs: needs: get_r_version with: r-version: "${{ needs.get_r_version.outputs.r-version }}" + test: + runs-on: ubuntu-latest + needs: get_r_version + container: + image: "ghcr.io/pharmaverse/admiralci-${{ needs.get_r_version.outputs.r-version }}:latest" + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up R + uses: r-lib/actions/setup-r@v2 + + - name: Install dependencies + run: | + Rscript -e 'install.packages("remotes")' + Rscript -e 'remotes::install_deps(dependencies = TRUE)' + + - name: Run tests + run: | + Rscript -e 'if (!requireNamespace("testthat", quietly = TRUE)) install.packages("testthat")' + Rscript -e 'testthat::test_dir("tests/testthat")' check: name: Check uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main