Skip to content

Commit

Permalink
Improved CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jun 3, 2024
1 parent ce0bb26 commit 0855b0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release', mariadb: true}
- {os: ubuntu-latest, r: 'release'}

env:
Expand All @@ -37,7 +37,8 @@ jobs:
extra-packages: any::rcmdcheck
needs: check

- name: Install MySQL
- if: ${{ !matrix.mariadb }}
name: Install MySQL
uses: ankane/setup-mysql@v1
with:
database: dbx_test
Expand All @@ -47,6 +48,12 @@ jobs:
mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'runneradmin'@'localhost'"
mysql -u root -e "FLUSH PRIVILEGES"
- if: ${{ matrix.mariadb }}
name: Install MariaDB
uses: ankane/setup-mysql@v1
with:
database: dbx_test

- name: Install Postgres
uses: ankane/setup-postgres@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/helper-run-insert-tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runInsertTests <- function(db, redshift=FALSE) {
})

test_that("insert returning works", {
skip_if(!isPostgres(db) || redshift)
skip_if(!(isPostgres(db) || isMariaDB(db)) || redshift)

events <- data.frame(id=c(1, 2), city=c("San Francisco", "Boston"), stringsAsFactors=FALSE)
res <- dbxInsert(db, "events", events, returning=c("id", "city"))
Expand All @@ -23,7 +23,7 @@ runInsertTests <- function(db, redshift=FALSE) {
})

test_that("insert returning star works", {
skip_if(!isPostgres(db) || redshift)
skip_if(!(isPostgres(db) || isMariaDB(db)) || redshift)

events <- data.frame(id=c(1, 2), city=c("San Francisco", "Boston"), stringsAsFactors=FALSE)
res <- dbxInsert(db, "events", events, returning=c("*"))
Expand Down

0 comments on commit 0855b0f

Please sign in to comment.