-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
576 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
name: R | ||
|
||
# Runs on every PR that touches something the R package might use | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "adbc.h" | ||
- "c/**" | ||
- "go/adbc/driver/**" | ||
- "go/adbc/pkg/**" | ||
- "r/**" | ||
- ".github/workflows/r-basic.yml" | ||
- ".github/workflows/r-check.yml" | ||
|
||
concurrency: | ||
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
check: | ||
strategy: | ||
matrix: | ||
os: [ubuntu] | ||
pkg: [adbcdrivermanager, adbcsqlite, adbcpostgresql, adbcflightsql, adbcsnowflake] | ||
|
||
uses: ./.github/workflows/r-check.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
pkg: ${{ matrix.pkg }} | ||
secrets: | ||
SNOWFLAKE_URI: ${{ secrets.SNOWFLAKE_URI }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# Reusable check for various combinations of (pkg, os, rversion) | ||
name: R | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
pkg: | ||
required: true | ||
type: string | ||
rversion: | ||
required: false | ||
default: release | ||
type: string | ||
secrets: | ||
SNOWFLAKE_URI: | ||
required: false | ||
|
||
jobs: | ||
r-check: | ||
runs-on: ${{ inputs.os }}-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: release | ||
use-public-rspm: true | ||
|
||
- name: Set PKG_CONFIG_PATH on MacOS | ||
if: inputs.pkg == 'adbcpostgresql' && runner.os == 'macOS' | ||
run: | | ||
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(brew --prefix libpq)/lib/pkgconfig:$(brew --prefix openssl)/lib/pkgconfig" | ||
echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}" >> $GITHUB_ENV | ||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::rcmdcheck, local::../adbcdrivermanager | ||
needs: check | ||
working-directory: r/${{ inputs.pkg }} | ||
|
||
- name: Start postgres test database | ||
if: inputs.pkg == 'adbcpostgresql' && runner.os == 'Linux' | ||
run: | | ||
cd r/adbcpostgresql | ||
docker compose up --detach postgres-test | ||
ADBC_POSTGRESQL_TEST_URI="postgresql://localhost:5432/postgres?user=postgres&password=password" | ||
echo "ADBC_POSTGRESQL_TEST_URI=${ADBC_POSTGRESQL_TEST_URI}" >> $GITHUB_ENV | ||
- name: Start FlightSQL test database | ||
if: inputs.pkg == 'adbcflightsql' && runner.os == 'Linux' | ||
run: | | ||
cd r/adbcpostgresql | ||
docker compose up --detach flightsql-sqlite-test | ||
ADBC_FLIGHTSQL_TEST_URI="grpc://localhost:8080" | ||
echo "ADBC_FLIGHTSQL_TEST_URI=${ADBC_FLIGHTSQL_TEST_URI}" >> $GITHUB_ENV | ||
- uses: r-lib/actions/check-r-package@v2 | ||
env: | ||
ADBC_SNOWFLAKE_TEST_URI: ${{ secrets.SNOWFLAKE_URI }} | ||
R_KEEP_PKG_SOURCE: yes | ||
with: | ||
working-directory: r/${{ inputs.pkg }} | ||
|
||
- name: Shutdown docker compose services | ||
if: runner.os == 'Linux' | ||
run: | | ||
docker compose down |
Oops, something went wrong.