Skip to content

Nightly Build

Nightly Build #30

Workflow file for this run

#
# 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: Nightly Build
on:
schedule:
- cron: '15 12 * * *'
workflow_dispatch:
# Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
permissions:
actions: read
pull-requests: read
checks: read
contents: read
deployments: read
id-token: none
issues: read
discussions: read
packages: read
pages: read
repository-projects: read
security-events: read
statuses: read
env:
GRADLE_TOS_ACCEPTED: ${{ vars.GRADLE_TOS_ACCEPTED }}
DEVELOCITY_SERVER: ${{ vars.DEVELOCITY_SERVER }}
DEVELOCITY_PROJECT_ID: ${{ vars.DEVELOCITY_PROJECT_ID }}
jobs:
nightly_build:
runs-on: ubuntu-latest
if: github.repository == 'apache/polaris'
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up JDK 21
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
with:
java-version: '21'
distribution: 'temurin'
- name: Setup test environment
uses: ./.github/actions/setup-test-env
- name: Prepare Gradle build cache
uses: ./.github/actions/ci-incr-build-cache-prepare
- name: Publish SNAPSHOTs to Apache Nexus Repository
run: ./gradlew publishToApache
env:
# publishToApache causes a GH API requests, use the token for those requests
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # zizmor: ignore[secrets-outside-env]
ORG_GRADLE_PROJECT_apacheUsername: ${{ secrets.NEXUS_USER }} # zizmor: ignore[secrets-outside-env]
ORG_GRADLE_PROJECT_apachePassword: ${{ secrets.NEXUS_PW }} # zizmor: ignore[secrets-outside-env]
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} # zizmor: ignore[secrets-outside-env]
nightly_build_python_client:
runs-on: ubuntu-latest
if: github.repository == 'apache/polaris'
permissions:
# IMPORTANT: this permission is mandatory for Trusted Publishing to PyPI
id-token: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
- name: Set up JDK for openapi-generator-cli
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
with:
distribution: 'temurin'
java-version: '21'
- name: Build Python client nightly
run: |
make client-nightly-build
- name: Publish Python client to Test PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: client/python/dist/
skip-existing: true