assignUser commented on code in PR #284:
URL: https://github.com/apache/arrow-cookbook/pull/284#discussion_r1053373702
##########
.github/workflows/test_java_cookbook.yml:
##########
@@ -54,6 +52,51 @@ jobs:
sudo apt update
sudo apt install libcurl4-openssl-dev libssl-dev
- name: Run tests
- run: make javatest
+ run: |
+ if [ "${{ github.base_ref }}" == "main" ]; then
+ export ARROW_NIGHTLY=1
+ else
+ export ARROW_NIGHTLY=0
+ fi
+ make javatest
+ - name: Build cookbook
+ run: |
+ if [ "${{ github.base_ref }}" == "main" ]; then
+ export ARROW_NIGHTLY=1
+ else
+ export ARROW_NIGHTLY=0
+ fi
Review Comment:
(same for the other occurences ofc) the general foirm is `${{ <condition> &&
<string_true> || <string_false> }}`
##########
.github/workflows/deploy_development_cookbooks.yml:
##########
@@ -0,0 +1,115 @@
+on:
+ push:
+ branches:
+ - main
+
+name: Deploy development Cookbooks
+
+jobs:
+ make_dev_cookbooks:
+ name: build
+ runs-on: ubuntu-latest
+ env:
+ ARROW_NIGHTLY: 1
+ steps:
+ - uses: actions/checkout@v3
+ - name: Setup R
+ uses: r-lib/actions/setup-r@v2
Review Comment:
This should cut ~ 10 min off of installing the R dependencies at no cost.
```suggestion
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
```
##########
.github/workflows/deploy_development_cookbooks.yml:
##########
@@ -0,0 +1,115 @@
+on:
+ push:
+ branches:
+ - main
+
+name: Deploy development Cookbooks
+
+jobs:
+ make_dev_cookbooks:
+ name: build
+ runs-on: ubuntu-latest
+ env:
+ ARROW_NIGHTLY: 1
+ steps:
+ - uses: actions/checkout@v3
+ - name: Setup R
+ uses: r-lib/actions/setup-r@v2
+ - name: Setup pandoc
+ uses: r-lib/actions/setup-pandoc@v2
+ - name: Install dependencies
+ run: |
+ sudo apt update
+ sudo apt install libcurl4-openssl-dev \
+ libidn2-dev \
+ libkrb5-dev \
+ libldap-dev \
+ libnghttp2-dev \
+ libpsl-dev \
+ librtmp-dev \
+ libssh-dev \
+ libssh2-1-dev \
+ libssl-dev \
+ maven \
+ openjdk-11-jdk \
+ python3-pip
+ - name: Run tests
+ run: make test
+ - name: Build and render books
+ run: make all
+ - name: Upload book artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: build_book
+ path: build/
+
+ make_dev_cpp:
+ name: build c++
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ shell: bash -l {0}
+ steps:
+ - uses: actions/checkout@v3
+ - name: Cache conda
+ uses: actions/cache@v2
+ env:
+ # Increase this value to reset cache if cpp/dev.yml has not changed
+ CACHE_NUMBER: 0
+ with:
+ path: ~/conda_pkgs_dir
+ key:
+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('cpp/dev.yml') }}
+ - name: Setup environment
+ uses: conda-incubator/setup-miniconda@v2
Review Comment:
is this action white listed by apache?
##########
.github/workflows/test_java_cookbook.yml:
##########
@@ -54,6 +52,51 @@ jobs:
sudo apt update
sudo apt install libcurl4-openssl-dev libssl-dev
- name: Run tests
- run: make javatest
+ run: |
+ if [ "${{ github.base_ref }}" == "main" ]; then
+ export ARROW_NIGHTLY=1
+ else
+ export ARROW_NIGHTLY=0
+ fi
+ make javatest
+ - name: Build cookbook
+ run: |
+ if [ "${{ github.base_ref }}" == "main" ]; then
+ export ARROW_NIGHTLY=1
+ else
+ export ARROW_NIGHTLY=0
+ fi
Review Comment:
You could move this to to env using gha expressions:
```yaml
env:
ARROW_R_NIGHTLY: ${{ github.base_ref == 'main' && 1 || 0 }}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]