| # 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: Test |
| |
| on: |
| push: |
| branches: |
| - '**' |
| - '!dependabot/**' |
| tags: |
| - '**' |
| pull_request: |
| |
| concurrency: |
| group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} |
| cancel-in-progress: true |
| |
| permissions: |
| contents: read |
| |
| jobs: |
| |
| lint: |
| name: Lint |
| runs-on: ubuntu-latest |
| timeout-minutes: 10 |
| steps: |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| |
| # ESLint |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 |
| with: |
| cache: npm |
| node-version: 24 |
| - name: Install ESLint dependencies |
| run: | |
| npm ci |
| - name: Run ESLint |
| run: | |
| npm run lint:ci |
| |
| # pre-commit |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| with: |
| python-version: 3 |
| - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
| with: |
| path: ~/.cache/pre-commit |
| key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} |
| restore-keys: pre-commit- |
| - name: Install pre-commit |
| run: | |
| python -m pip install pre-commit |
| - name: Run pre-commit |
| run: | |
| pre-commit run --show-diff-on-failure --color=always --all-files |
| |
| docker: |
| name: Debian Node.js ${{ matrix.node }} |
| runs-on: ubuntu-latest |
| timeout-minutes: 60 |
| strategy: |
| fail-fast: false |
| matrix: |
| node: [20, 24] |
| env: |
| DOCKER_VOLUME_PREFIX: .docker/ |
| NODE: ${{ matrix.node }} |
| steps: |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| - name: Cache |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
| with: |
| path: .docker |
| key: jest-docker-${{ matrix.node }}-${{ hashFiles('src/**/*.ts', 'test/**/*.ts', 'package-lock.json') }} |
| restore-keys: jest-docker-${{ matrix.node }}- |
| - name: Run |
| run: | |
| docker compose run debian |
| |
| macos: |
| name: macOS Node.JS ${{ matrix.node }} |
| runs-on: macos-latest |
| timeout-minutes: 45 |
| strategy: |
| fail-fast: false |
| matrix: |
| node: [20, 24] |
| steps: |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| - name: Cache |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
| with: |
| path: .jest-cache |
| key: jest-${{ runner.os }}-${{ hashFiles('src/**/*.ts', 'test/**/*.ts', 'package-lock.json') }} |
| restore-keys: jest-${{ runner.os }}- |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 |
| with: |
| node-version: ${{ matrix.node }} |
| - name: Build |
| shell: bash |
| run: ci/scripts/build.sh $(pwd) |
| - name: Test |
| shell: bash |
| run: ci/scripts/test.sh $(pwd) |
| |
| windows: |
| name: Windows NodeJS ${{ matrix.node }} |
| runs-on: windows-latest |
| timeout-minutes: 45 |
| strategy: |
| fail-fast: false |
| matrix: |
| node: [20, 24] |
| steps: |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| - name: Cache |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
| with: |
| path: .jest-cache |
| key: jest-${{ runner.os }}-${{ hashFiles('src/**/*.ts', 'test/**/*.ts', 'package-lock.json') }} |
| restore-keys: jest-${{ runner.os }}- |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 |
| with: |
| node-version: ${{ matrix.node }} |
| - name: Build |
| shell: bash |
| run: ci/scripts/build.sh $(pwd) |
| - name: Test |
| shell: bash |
| run: ci/scripts/test.sh $(pwd) |
| |
| integration: |
| name: Integration |
| runs-on: ubuntu-latest |
| timeout-minutes: 45 |
| steps: |
| - name: Checkout Arrow |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| fetch-depth: 0 |
| repository: apache/arrow |
| submodules: recursive |
| - name: Checkout Arrow Rust |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| repository: apache/arrow-rs |
| path: rust |
| - name: Checkout Arrow nanoarrow |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| repository: apache/arrow-nanoarrow |
| path: nanoarrow |
| - name: Checkout Arrow Go |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| repository: apache/arrow-go |
| path: go |
| - name: Checkout Arrow Java |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| repository: apache/arrow-java |
| path: java |
| - name: Checkout Arrow JavaScript |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| path: js |
| - name: Checkout Arrow .NET |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| repository: apache/arrow-dotnet |
| path: dotnet |
| - name: Free up disk space |
| run: | |
| ci/scripts/util_free_space.sh |
| - name: Cache Docker Volumes |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
| with: |
| path: .docker |
| key: integration-conda-${{ hashFiles('cpp/**') }} |
| restore-keys: integration-conda- |
| - name: Setup Python |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| with: |
| python-version: 3 |
| - name: Patch Archery to enable BinaryView tests |
| run: | |
| patch -p1 < js/.github/patches/enable-binaryview-integration-tests.patch |
| - name: Setup Archery |
| run: pip install -e dev/archery[docker] |
| - name: Execute Docker Build |
| run: | |
| source ci/scripts/util_enable_core_dumps.sh |
| archery docker run \ |
| -e ARCHERY_DEFAULT_BRANCH=main \ |
| -e ARCHERY_INTEGRATION_TARGET_IMPLEMENTATIONS=js \ |
| -e ARCHERY_INTEGRATION_WITH_DOTNET=1 \ |
| -e ARCHERY_INTEGRATION_WITH_GO=1 \ |
| -e ARCHERY_INTEGRATION_WITH_JAVA=1 \ |
| -e ARCHERY_INTEGRATION_WITH_JS=1 \ |
| -e ARCHERY_INTEGRATION_WITH_NANOARROW=1 \ |
| -e ARCHERY_INTEGRATION_WITH_RUST=1 \ |
| conda-integration |