Skip to content

Commit

Permalink
Attempt to use repository secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
martinstuder committed Oct 7, 2024
1 parent 00e69eb commit 4330a1e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ jobs:
java: 17
spark: 3.3
r-version: release

env:
SPARK_VERSION: ${{ matrix.config.spark }}
BILLING_PROJECT_ID: ${{ secrets.GCLOUD_BILLING_PROJECT_ID }}
MATERIALIZATION_DATASET: test
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/adc.json

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -109,9 +114,35 @@ jobs:
run: |
sparklyr::spark_install(version="${{ matrix.config.spark }}")
shell: Rscript {0}

- name: Set Google application default credentials
env:
ADC: ${{ secrets.GCLOUD_APPLICATION_CREDENTIALS }}
shell: bash
run: |
echo $ADC > $GOOGLE_APPLICATION_CREDENTIALS
- name: Run R CMD check
uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
check-dir: '"check"'

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ matrix.config.os-name }}${{matrix.config.os-version}}-Java${{ matrix.config.java }}-R${{ matrix.config.r-version }-Spark${{ matrix.config.spark }}-results
path: |
check/sparkbq.Rcheck/
!check/sparkbq.Rcheck/00_pkg_src/
!adc.json
- name: Upload successfully built package
if: success()
uses: actions/upload-artifact@main
with:
name: ${{ matrix.config.os-name }}${{matrix.config.os-version}}-Java${{ matrix.config.java }}-R${{ matrix.config.r-version }}-Spark${{ matrix.config.spark }}-results
path: |
check/sparkbq_*.tar.gz
!adc.json
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ vignettes/*.pdf
# Spark-specific files
*.log
logs

# Ignore generated credentials from google-github-actions/auth
gha-creds-*.json

0 comments on commit 4330a1e

Please sign in to comment.