errose28 commented on code in PR #6916: URL: https://github.com/apache/ozone/pull/6916#discussion_r1722368969
########## .github/workflows/doc.yml: ########## @@ -0,0 +1,149 @@ +# 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: xml-to-md + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-20.04 + timeout-minutes: 60 + strategy: + matrix: + java: [ 8 ] + fail-fast: false + steps: + - name: Checkout project + uses: actions/checkout@v4 + + - name: Cache for npm dependencies + uses: actions/cache@v4 + with: + path: | + ~/.pnpm-store + **/node_modules + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + + - name: Cache for maven dependencies + uses: actions/cache/restore@v4 + with: + path: | + ~/.m2/repository/*/*/* + !~/.m2/repository/org/apache/ozone + key: maven-repo-${{ hashFiles('**/pom.xml') }} + restore-keys: | + maven-repo- + - name: Download Ratis repo + if: ${{ inputs.ratis_args != '' }} + uses: actions/download-artifact@v4 + with: + name: ratis-jars + path: | + ~/.m2/repository/org/apache/ratis + - name: Setup java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Run a full build Review Comment: IMO we should build the file on every commit, and only publish for commits to master: - The actual construction of the markdown file is much easier and faster than most of what we are doing on CI as long as we piggyback off an existing Ozone build. It will not add noticeable overhead. - Doing a duplicate Ozone build **will** add noticeable overhead to the CI times for commits to master. - Running on every commit allows us to verify how those code changes affect the workflow: - Changes that add configs without descriptions can be rejected. - Changes to the doc file generation of this script itself are automatically tested. - Changes that cause unexpected behavior this automation may not be prepared to handle will be caught quickly. Even if we decide to only have this run on master, it can still be part of the main CI workflow to reuse the Ozone build, and skipped using a conditional based on the target branch. The `publish` workflow in the new website is an example of this. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
