Skip to content

Commit ee12623

Browse files
authored
Merge pull request #38 from richfitz/i37-gha
2 parents 178c521 + 89371ae commit ee12623

22 files changed

+272
-163
lines changed

.Rbuildignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
^\.Rproj\.user$
33
^Makefile$
44
^README.Rmd$
5-
^.travis.yml$
6-
^appveyor.yml$
75
^src/hiredis/.*\.[oa]$
86
^ignore$
97
^update_web\.sh$
108
^src/Makevars$
119
^redux_.*\.tar\.gz$
1210
^TODO\.md$
1311
^extra$
14-
^appveyor\.yml$
1512
^windows$
1613
^redux_.*\.tar\.gz$
1714
^vignettes/src$
1815
^\.lintr$
1916
^\.valgrind_ignore$
2017
^autobrew$
2118
^src/redux\.so\.dSYM$
19+
^\.github$
20+
^scripts$

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request:
9+
branches:
10+
- main
11+
- master
12+
13+
name: R-CMD-check
14+
15+
jobs:
16+
R-CMD-check:
17+
runs-on: ${{ matrix.config.os }}
18+
19+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
config:
25+
- {os: windows-latest, r: 'release'}
26+
- {os: macOS-latest, r: 'release'}
27+
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
28+
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
29+
30+
env:
31+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
32+
RSPM: ${{ matrix.config.rspm }}
33+
REDUX_TEST_USE_REDIS: true
34+
REDUX_TEST_ISOLATED: true
35+
36+
steps:
37+
- uses: actions/checkout@v2
38+
39+
- uses: r-lib/actions/setup-r@v1
40+
with:
41+
r-version: ${{ matrix.config.r }}
42+
43+
- uses: r-lib/actions/setup-pandoc@v1
44+
45+
- name: Start Redis
46+
if: runner.os != 'Windows'
47+
uses: shogo82148/actions-setup-redis@v1
48+
with:
49+
redis-version: "4.x"
50+
51+
- name: Start Redis (windows)
52+
if: runner.os == 'Windows'
53+
run: |
54+
choco install memurai-developer
55+
56+
- name: Query dependencies
57+
run: |
58+
install.packages('remotes')
59+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
60+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
61+
shell: Rscript {0}
62+
63+
- name: Cache R packages
64+
if: runner.os != 'Windows'
65+
uses: actions/cache@v2
66+
with:
67+
path: ${{ env.R_LIBS_USER }}
68+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
69+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
70+
71+
- name: Install system dependencies
72+
if: runner.os == 'Linux'
73+
run: |
74+
while read -r cmd
75+
do
76+
eval sudo $cmd
77+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
78+
79+
- name: "[macOS] system dependencies"
80+
if: runner.os == 'macOS'
81+
run: |
82+
brew install hiredis
83+
84+
- name: Install dependencies
85+
run: |
86+
remotes::install_deps(dependencies = TRUE)
87+
remotes::install_cran("rcmdcheck")
88+
shell: Rscript {0}
89+
90+
- name: Check
91+
env:
92+
_R_CHECK_CRAN_INCOMING_REMOTE_: false
93+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
94+
shell: Rscript {0}
95+
96+
- name: Upload check results
97+
if: failure()
98+
uses: actions/upload-artifact@main
99+
with:
100+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
101+
path: check

.github/workflows/pkgdown.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
7+
name: pkgdown
8+
9+
jobs:
10+
pkgdown:
11+
runs-on: macOS-latest
12+
env:
13+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
14+
REDUX_TEST_USE_REDIS: true
15+
REDUX_TEST_ISOLATED: true
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- uses: r-lib/actions/setup-r@v1
20+
21+
- uses: r-lib/actions/setup-pandoc@v1
22+
23+
- name: Start Redis
24+
uses: shogo82148/actions-setup-redis@v1
25+
with:
26+
redis-version: "4.x"
27+
28+
- name: "[macOS] system dependencies"
29+
if: runner.os == 'macOS'
30+
run: |
31+
brew install hiredis
32+
33+
- name: Query dependencies
34+
run: |
35+
install.packages('remotes')
36+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
37+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
38+
shell: Rscript {0}
39+
40+
- name: Cache R packages
41+
uses: actions/cache@v2
42+
with:
43+
path: ${{ env.R_LIBS_USER }}
44+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
45+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
46+
47+
- name: Install dependencies
48+
run: |
49+
remotes::install_deps(dependencies = TRUE)
50+
install.packages("pkgdown", type = "binary")
51+
shell: Rscript {0}
52+
53+
- name: Install package
54+
run: R CMD INSTALL .
55+
56+
- name: Deploy package
57+
run: |
58+
git config --local user.email "actions@github.com"
59+
git config --local user.name "GitHub Actions"
60+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
pull_request:
7+
branches:
8+
- main
9+
- master
10+
11+
name: test-coverage
12+
13+
jobs:
14+
test-coverage:
15+
runs-on: macOS-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
REDUX_TEST_USE_REDIS: true
19+
REDUX_TEST_ISOLATED: true
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- uses: r-lib/actions/setup-r@v1
24+
25+
- uses: r-lib/actions/setup-pandoc@v1
26+
27+
- name: Start Redis
28+
uses: shogo82148/actions-setup-redis@v1
29+
with:
30+
redis-version: "4.x"
31+
32+
- name: "[macOS] system dependencies"
33+
if: runner.os == 'macOS'
34+
run: |
35+
brew install hiredis
36+
37+
- name: Query dependencies
38+
run: |
39+
install.packages('remotes')
40+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
41+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
42+
shell: Rscript {0}
43+
44+
- name: Cache R packages
45+
uses: actions/cache@v2
46+
with:
47+
path: ${{ env.R_LIBS_USER }}
48+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
49+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
50+
51+
- name: Install dependencies
52+
run: |
53+
install.packages(c("remotes"))
54+
remotes::install_deps(dependencies = TRUE)
55+
remotes::install_cran("covr")
56+
shell: Rscript {0}
57+
58+
- name: Test coverage
59+
run: covr::codecov()
60+
shell: Rscript {0}

.travis.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# redux
22

3+
<!-- badges: start -->
34
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
4-
[![Build Status](https://travis-ci.org/richfitz/redux.svg?branch=master)](https://travis-ci.org/richfitz/redux)
5-
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/richfitz/redux?branch=master&svg=true)](https://ci.appveyor.com/project/richfitz/redux)
5+
[![R build status](https://github.com/richfitz/redux/workflows/R-CMD-check/badge.svg)](https://github.com/richfitz/redux/actions)
66
[![codecov.io](https://codecov.io/github/richfitz/redux/coverage.svg?branch=master)](https://codecov.io/github/richfitz/redux?branch=master)
7+
<!-- badges: end -->
78

89
`redux` provides an interface to Redis. Two interfaces are provided; a low level interface (allowing execution of arbitrary Redis commands with almost no interface) and a high-level interface with an API that matches all of the several hundred Redis commands.
910

@@ -63,7 +64,7 @@ To use the test suite, please set the environment variables
6364

6465
- `NOT_CRAN=true`
6566
- `REDUX_TEST_USE_REDIS=true`
66-
- `REDUX_TEST_USE_REDIS_ISOLATED=true`
67+
- `REDUX_TEST_ISOLATED=true`
6768

6869
The first two opt in to using redis _at all_, and the third activates commands that may be destructive or undesirable to use on a production server.
6970

appveyor.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)