-
Notifications
You must be signed in to change notification settings - Fork 36
99 lines (95 loc) · 2.52 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
# run by clicking buttons in the GitHub Actions UI
workflow_dispatch:
inputs:
deploy-docs:
description: 'Update the docs site?'
required: true
type: boolean
# automatically cancel in-progress builds if another commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# parallelize compilation (extra important for Linux, where CRAN doesn't supply pre-compiled binaries)
MAKEFLAGS: "-j4"
jobs:
build-docs:
uses: ./.github/workflows/build-docs.yaml
with:
deploy: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch' && inputs.deploy-docs == true) }}
secrets: inherit
lint:
name: lint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pre-commit/[email protected]
- name: set up R
uses: r-lib/actions/setup-r@v2
- name: run lintr
run: |
Rscript -e "install.packages('lintr')"
Rscript ./.ci/lint-r-code.R $(pwd)
test:
name: test (ES ${{ matrix.es_version }})
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
es_version:
- 1.7.6
- 2.4.6
- 5.6.16
- 6.8.15
- 7.0.1
- 7.17.22
- 8.0.1
- 8.5.3
- 8.10.4
- 8.15.5
- 8.17.2
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: release
- name: set up pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: run tests
shell: bash
run: |
export ES_VERSION=${{ matrix.es_version }}
$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
all-successful:
if: always()
runs-on: ubuntu-latest
needs:
- build-docs
- lint
- test
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}