Skip to content

chore(java-cloud-bom): update copyright years and license headers to … #3

chore(java-cloud-bom): update copyright years and license headers to …

chore(java-cloud-bom): update copyright years and license headers to … #3

on:

Check failure on line 1 in .github/workflows/java-cloud-bom-bom-content-test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/java-cloud-bom-bom-content-test.yaml

Invalid workflow file

(Line: 26, Col: 5): 'if' is already defined, (Line: 61, Col: 5): 'if' is already defined
push:
branches:
- main
pull_request:
name: java-cloud-bom ci
env:
BUILD_SUBDIR: java-cloud-bom
jobs:
filter:
runs-on: ubuntu-latest
outputs:
library: ${{ steps.filter.outputs.library }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
library:
- 'java-cloud-bom/**'
bom-content-test:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 11
cache: maven
- run: java -version
- name: Pre-install all BOM modules to populate local cache
run: |
for f in $(find . -mindepth 2 -name "pom.xml" | grep "\-bom/pom.xml" | grep -v "samples" | grep -v "/tests/" | grep -v "/resources/"); do
grep -q "<packaging>pom</packaging>" "$f" && echo "$f"
done | sed 's|^\./||' | sed 's|/pom.xml$||' | tr '\n' ',' | sed 's/,$//' > bom_projects.txt
mvn install -pl $(cat bom_projects.txt) -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
rm bom_projects.txt
shell: bash
- name: Install BOMs
run: |
mvn -B -V -ntp install -f java-cloud-bom/pom.xml
- name: Ensure the members of the Libraries BOM exist in Maven Central
uses: ./java-cloud-bom/tests/validate-bom
with:
bom-path: java-cloud-bom/libraries-bom/pom.xml
- name: Ensure the BOM has valid content (at releases)
if: github.head_ref == 'release-please--branches--main'
run: |
mvn -B -V -ntp verify -Dtest="BomContentTest#testLibrariesBom"
working-directory: java-cloud-bom/tests
bom-assertion-test:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
name: BomContentAssertionsTest (Test for assertion logic in BomContentTest)
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 11
- run: java -version
- name: Pre-install all BOM modules to populate local cache
run: |
for f in $(find . -mindepth 2 -name "pom.xml" | grep "\-bom/pom.xml" | grep -v "samples" | grep -v "/tests/" | grep -v "/resources/"); do
grep -q "<packaging>pom</packaging>" "$f" && echo "$f"
done | sed 's|^\./||' | sed 's|/pom.xml$||' | tr '\n' ',' | sed 's/,$//' > bom_projects.txt
mvn install -pl $(cat bom_projects.txt) -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
rm bom_projects.txt
shell: bash
- name: Install BOMs
run: |
mvn -B -V -ntp install -f java-cloud-bom/pom.xml
- run: |
mvn -B -V -ntp verify -Dtest="BomContentAssertionsTest"
working-directory: java-cloud-bom/tests