Skip to content

WIP: restructure CI #46

WIP: restructure CI

WIP: restructure CI #46

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: pre-commit/[email protected]
- uses: r-lib/actions/setup-r@v2
with:
r-version: devel
- name: lint R code
run: |
Rscript -e "install.packages('lintr')"
Rscript ./.ci/lint_r_code.R $(pwd)
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: r-lib/actions/setup-r@v2
with:
r-version: devel
- uses: r-lib/actions/setup-pandoc@v2
- name: build package
run: |
Rscript -e "install.packages(c('rmarkdown', 'knitr'), repos = 'https://cran.r-project.org')"
./.ci/build-package.sh
mkdir -p ./artifacts
mv ./uptasticsearch*.tar.gz ./artifacts
- name: upload
uses: actions/upload-artifact@v4
with:
name: r-package
path: ./artifacts
if-no-files-found: error
# test:
# name: ${{ matrix.task }} (ES ${{ matrix.es_version }})
# runs-on: ubuntu-latest
# timeout-minutes: 60
# strategy:
# fail-fast: false
# matrix:
# include:
# #---#
# # R #
# #---#
# - task: rpkg
# es_version: 1.7.6
# - task: rpkg
# es_version: 2.4.6
# - task: rpkg
# es_version: 5.6.16
# - task: rpkg
# es_version: 6.0.1
# - task: rpkg
# es_version: 6.8.15
# - task: rpkg
# es_version: 7.1.1
# - task: rpkg
# es_version: 7.2.1
# - task: rpkg
# es_version: 7.3.2
# - task: rpkg
# es_version: 7.4.2
# - task: rpkg
# es_version: 7.5.2
# - task: rpkg
# es_version: 7.6.2
# - task: rpkg
# es_version: 7.7.1
# - task: rpkg
# es_version: 7.8.1
# - task: rpkg
# es_version: 7.9.3
# - task: rpkg
# es_version: 7.10.2
# - task: rpkg
# es_version: 7.11.2
# - task: rpkg
# es_version: 7.12.1
# steps:
# - name: checkout repository
# uses: actions/checkout@v2
# with:
# fetch-depth: 1
# - name: set up R
# if: matrix.task == 'rpkg'
# uses: r-lib/actions/setup-r@v2
# with:
# r-version: release
# - name: set up pandoc
# if: matrix.task == 'rpkg'
# uses: r-lib/actions/setup-pandoc@v2
# - name: run tests
# shell: bash
# run: |
# export CONDA_DIR=${HOME}/miniconda3
# export ES_VERSION=${{ matrix.es_version }}
# export PATH=${CONDA_DIR}/bin:${HOME}/.local/bin:$PATH
# export TASK="${{ matrix.task }}"
# $GITHUB_WORKSPACE/.ci/setup.sh
# $GITHUB_WORKSPACE/.ci/install.sh
# $GITHUB_WORKSPACE/setup_local.sh ${{ matrix.es_version }}
# $GITHUB_WORKSPACE/.ci/test.sh
# $GITHUB_WORKSPACE/.ci/report_to_covr.sh
# # 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 tests succeeded
# run: echo "🎉"