From e004e5f56e0d8f2bbce4bc750d9eb00d82c58847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Kautler?= Date: Wed, 19 Apr 2023 19:42:55 +0200 Subject: [PATCH] test --- .github/workflows/branches-and-prs.yml | 146 ++++++----- .github/workflows/codeql-analysis.yml | 72 +++--- .../workflows/gradle-wrapper-validation.yml | 42 ++-- .github/workflows/release.yml | 236 +++++++++--------- 4 files changed, 242 insertions(+), 254 deletions(-) diff --git a/.github/workflows/branches-and-prs.yml b/.github/workflows/branches-and-prs.yml index ae6f5b9538..1f9d338611 100644 --- a/.github/workflows/branches-and-prs.yml +++ b/.github/workflows/branches-and-prs.yml @@ -2,105 +2,101 @@ # If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. # Generated with https://github.com/typesafegithub/github-workflows-kt -name: Verify Branches and PRs +name: 'Verify Branches and PRs' on: push: branches-ignore: - - master - - gh-pages + - 'master' + - 'gh-pages' pull_request: branches: - '*' concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}' cancel-in-progress: true jobs: check_yaml_consistency: - name: Check YAML consistency - runs-on: ubuntu-latest + name: 'Check YAML consistency' + runs-on: 'ubuntu-latest' steps: - - id: step-0 - name: Check out - uses: actions/checkout@v3 - - id: step-1 - name: Execute script - run: rm '.github/workflows/branches-and-prs.yml' && '.github/workflows/branches-and-prs.main.kts' - - id: step-2 - name: Consistency check - run: git diff --exit-code '.github/workflows/branches-and-prs.yml' + - id: 'step-0' + name: 'Check out' + uses: 'actions/checkout@v3' + - id: 'step-1' + name: 'Execute script' + run: 'rm ''.github/workflows/branches-and-prs.yml'' && ''.github/workflows/branches-and-prs.main.kts''' + - id: 'step-2' + name: 'Consistency check' + run: 'git diff --exit-code ''.github/workflows/branches-and-prs.yml''' check_all_workflow_yaml_consistency: - name: Check all Workflow YAML consistency - runs-on: ubuntu-latest - needs: - - check_yaml_consistency + name: 'Check all Workflow YAML consistency' + runs-on: 'ubuntu-latest' steps: - - id: step-0 - name: Checkout Repository - uses: actions/checkout@v3 - - id: step-1 - name: Regenerate all workflow YAMLs and check for modifications - run: find .github/workflows -mindepth 1 -maxdepth 1 -name "*.main.kts" | xargs -ri sh -c '{} && git diff --exit-code' + - id: 'step-0' + name: 'Checkout Repository' + uses: 'actions/checkout@v3' + - id: 'step-1' + name: 'Regenerate all workflow YAMLs and check for modifications' + run: 'find .github/workflows -mindepth 1 -maxdepth 1 -name "*.main.kts" | xargs -ri sh -c ''{} && git diff --exit-code''' build-and-verify: - name: Build and Verify - runs-on: ${{ matrix.os }} - needs: - - check_yaml_consistency + name: 'Build and Verify' + runs-on: '${{ matrix.os }}' strategy: fail-fast: false matrix: os: - - ubuntu-latest + - 'ubuntu-latest' variant: - - 2.5 - - 3.0 - - 4.0 + - '2.5' + - '3.0' + - '4.0' java: - - 8 - - 11 - - 17 + - '8' + - '11' + - '17' exclude: - - os: ubuntu-latest - variant: 2.5 - java: 17 + - os: 'ubuntu-latest' + variant: '2.5' + java: '17' include: - - os: windows-latest - variant: 2.5 - java: 8 - - os: windows-latest - variant: 3.0 - java: 8 - - os: windows-latest - variant: 4.0 - java: 8 - - os: macos-latest - variant: 2.5 - java: 8 - - os: macos-latest - variant: 3.0 - java: 8 - - os: macos-latest - variant: 4.0 - java: 8 + - os: 'windows-latest' + variant: '2.5' + java: '8' + - os: 'windows-latest' + variant: '3.0' + java: '8' + - os: 'windows-latest' + variant: '4.0' + java: '8' + - os: 'macos-latest' + variant: '2.5' + java: '8' + - os: 'macos-latest' + variant: '3.0' + java: '8' + - os: 'macos-latest' + variant: '4.0' + java: '8' steps: - - id: step-0 - name: Checkout Repository - uses: actions/checkout@v3 + - id: 'step-0' + name: 'Checkout Repository' + uses: 'actions/checkout@v3' with: - fetch-depth: 2 - - id: step-1 - name: Set up JDKs - uses: ./.github/actions/setup-build-env + fetch-depth: '2' + - id: 'step-1' + name: 'Set up JDKs' + uses: './.github/actions/setup-build-env' with: - additional-java-version: ${{ matrix.java }} - - id: step-2 - name: Build Spock - uses: gradle/gradle-build-action@v2 + additional-java-version: '${{ matrix.java }}' + - id: 'step-2' + name: 'Build Spock' + uses: 'gradle/gradle-build-action@v2' with: - arguments: --no-parallel --stacktrace ghActionsBuild "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}" + arguments: '--no-parallel --stacktrace ghActionsBuild "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}"' env: - ORG_GRADLE_PROJECT_spockBuildCacheUsername: ${{ secrets.SPOCK_BUILD_CACHE_USERNAME }} - ORG_GRADLE_PROJECT_spockBuildCachePassword: ${{ secrets.SPOCK_BUILD_CACHE_PASSWORD }} - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - - id: step-3 - name: Upload to Codecov.io - uses: codecov/codecov-action@v3 + ORG_GRADLE_PROJECT_spockBuildCacheUsername: '${{ secrets.SPOCK_BUILD_CACHE_USERNAME }}' + ORG_GRADLE_PROJECT_spockBuildCachePassword: '${{ secrets.SPOCK_BUILD_CACHE_PASSWORD }}' + GRADLE_ENTERPRISE_ACCESS_KEY: '${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}' + - id: 'step-3' + name: 'Upload to Codecov.io' + uses: 'codecov/codecov-action@v3' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1cd3fd115f..195836020a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,58 +2,56 @@ # If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. # Generated with https://github.com/typesafegithub/github-workflows-kt -name: Code scanning - action +name: 'Code scanning - action' on: push: branches: - '!dependabot/**' pull_request: {} schedule: - - cron: 0 15 * * TUE + - cron: '0 15 * * TUE' concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + group: '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}' cancel-in-progress: true jobs: check_yaml_consistency: - name: Check YAML consistency - runs-on: ubuntu-latest + name: 'Check YAML consistency' + runs-on: 'ubuntu-latest' steps: - - id: step-0 - name: Check out - uses: actions/checkout@v3 - - id: step-1 - name: Execute script - run: rm '.github/workflows/codeql-analysis.yml' && '.github/workflows/codeql-analysis.main.kts' - - id: step-2 - name: Consistency check - run: git diff --exit-code '.github/workflows/codeql-analysis.yml' + - id: 'step-0' + name: 'Check out' + uses: 'actions/checkout@v3' + - id: 'step-1' + name: 'Execute script' + run: 'rm ''.github/workflows/codeql-analysis.yml'' && ''.github/workflows/codeql-analysis.main.kts''' + - id: 'step-2' + name: 'Consistency check' + run: 'git diff --exit-code ''.github/workflows/codeql-analysis.yml''' codeql-build: - name: CodeQL-Build - runs-on: ubuntu-latest - needs: - - check_yaml_consistency + name: 'CodeQL-Build' + runs-on: 'ubuntu-latest' strategy: fail-fast: false matrix: variant: - - 2.5 - - 3.0 - - 4.0 + - '2.5' + - '3.0' + - '4.0' steps: - - id: step-0 - name: Checkout Repository - uses: actions/checkout@v3 - - id: step-1 - name: Set up JDKs - uses: ./.github/actions/setup-build-env - - id: step-2 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - - id: step-3 - name: Build Spock Classes - uses: gradle/gradle-build-action@v2 + - id: 'step-0' + name: 'Checkout Repository' + uses: 'actions/checkout@v3' + - id: 'step-1' + name: 'Set up JDKs' + uses: './.github/actions/setup-build-env' + - id: 'step-2' + name: 'Initialize CodeQL' + uses: 'github/codeql-action/init@v2' + - id: 'step-3' + name: 'Build Spock Classes' + uses: 'gradle/gradle-build-action@v2' with: - arguments: --stacktrace --no-build-cache testClasses "-Dvariant=${{ matrix.variant }}" - - id: step-4 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + arguments: '--stacktrace --no-build-cache testClasses "-Dvariant=${{ matrix.variant }}"' + - id: 'step-4' + name: 'Perform CodeQL Analysis' + uses: 'github/codeql-action/analyze@v2' diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 1b344e6aad..c978bbe985 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -2,33 +2,31 @@ # If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. # Generated with https://github.com/typesafegithub/github-workflows-kt -name: Validate Gradle Wrapper +name: 'Validate Gradle Wrapper' on: push: {} pull_request: {} jobs: check_yaml_consistency: - name: Check YAML consistency - runs-on: ubuntu-latest + name: 'Check YAML consistency' + runs-on: 'ubuntu-latest' steps: - - id: step-0 - name: Check out - uses: actions/checkout@v3 - - id: step-1 - name: Execute script - run: rm '.github/workflows/gradle-wrapper-validation.yml' && '.github/workflows/gradle-wrapper-validation.main.kts' - - id: step-2 - name: Consistency check - run: git diff --exit-code '.github/workflows/gradle-wrapper-validation.yml' + - id: 'step-0' + name: 'Check out' + uses: 'actions/checkout@v3' + - id: 'step-1' + name: 'Execute script' + run: 'rm ''.github/workflows/gradle-wrapper-validation.yml'' && ''.github/workflows/gradle-wrapper-validation.main.kts''' + - id: 'step-2' + name: 'Consistency check' + run: 'git diff --exit-code ''.github/workflows/gradle-wrapper-validation.yml''' validation: - name: Validation - runs-on: ubuntu-latest - needs: - - check_yaml_consistency + name: 'Validation' + runs-on: 'ubuntu-latest' steps: - - id: step-0 - name: Checkout Repository - uses: actions/checkout@v3 - - id: step-1 - name: Validate Wrapper - uses: gradle/wrapper-validation-action@v1 + - id: 'step-0' + name: 'Checkout Repository' + uses: 'actions/checkout@v3' + - id: 'step-1' + name: 'Validate Wrapper' + uses: 'gradle/wrapper-validation-action@v1' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a9835d3143..c6df625eb3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,166 +2,162 @@ # If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. # Generated with https://github.com/typesafegithub/github-workflows-kt -name: Build and Release Spock +name: 'Build and Release Spock' on: push: branches: - - master + - 'master' tags: - - spock-* + - 'spock-*' jobs: check_yaml_consistency: - name: Check YAML consistency - runs-on: ubuntu-latest + name: 'Check YAML consistency' + runs-on: 'ubuntu-latest' steps: - - id: step-0 - name: Check out - uses: actions/checkout@v3 - - id: step-1 - name: Execute script - run: rm '.github/workflows/release.yml' && '.github/workflows/release.main.kts' - - id: step-2 - name: Consistency check - run: git diff --exit-code '.github/workflows/release.yml' + - id: 'step-0' + name: 'Check out' + uses: 'actions/checkout@v3' + - id: 'step-1' + name: 'Execute script' + run: 'rm ''.github/workflows/release.yml'' && ''.github/workflows/release.main.kts''' + - id: 'step-2' + name: 'Consistency check' + run: 'git diff --exit-code ''.github/workflows/release.yml''' build-and-verify: - name: Build and Verify - runs-on: ${{ matrix.os }} - needs: - - check_yaml_consistency - if: github.repository == 'spockframework/spock' + name: 'Build and Verify' + runs-on: '${{ matrix.os }}' + if: 'github.repository == ''spockframework/spock''' strategy: fail-fast: false matrix: os: - - ubuntu-latest + - 'ubuntu-latest' variant: - - 2.5 - - 3.0 - - 4.0 + - '2.5' + - '3.0' + - '4.0' java: - - 8 - - 11 - - 17 + - '8' + - '11' + - '17' exclude: - - os: ubuntu-latest - variant: 2.5 - java: 17 + - os: 'ubuntu-latest' + variant: '2.5' + java: '17' include: - - os: windows-latest - variant: 2.5 - java: 8 - - os: windows-latest - variant: 3.0 - java: 8 - - os: windows-latest - variant: 4.0 - java: 8 - - os: macos-latest - variant: 2.5 - java: 8 - - os: macos-latest - variant: 3.0 - java: 8 - - os: macos-latest - variant: 4.0 - java: 8 + - os: 'windows-latest' + variant: '2.5' + java: '8' + - os: 'windows-latest' + variant: '3.0' + java: '8' + - os: 'windows-latest' + variant: '4.0' + java: '8' + - os: 'macos-latest' + variant: '2.5' + java: '8' + - os: 'macos-latest' + variant: '3.0' + java: '8' + - os: 'macos-latest' + variant: '4.0' + java: '8' steps: - - id: step-0 - name: Checkout Repository - uses: actions/checkout@v3 + - id: 'step-0' + name: 'Checkout Repository' + uses: 'actions/checkout@v3' with: - fetch-depth: 2 - - id: step-1 - name: Set up JDKs - uses: ./.github/actions/setup-build-env + fetch-depth: '2' + - id: 'step-1' + name: 'Set up JDKs' + uses: './.github/actions/setup-build-env' with: - additional-java-version: ${{ matrix.java }} - - id: step-2 - name: Build Spock - uses: gradle/gradle-build-action@v2 + additional-java-version: '${{ matrix.java }}' + - id: 'step-2' + name: 'Build Spock' + uses: 'gradle/gradle-build-action@v2' with: - arguments: --no-parallel --stacktrace ghActionsBuild "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}" -Dscan.tag.main-build + arguments: '--no-parallel --stacktrace ghActionsBuild "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}" -Dscan.tag.main-build' env: - ORG_GRADLE_PROJECT_spockBuildCacheUsername: ${{ secrets.SPOCK_BUILD_CACHE_USERNAME }} - ORG_GRADLE_PROJECT_spockBuildCachePassword: ${{ secrets.SPOCK_BUILD_CACHE_PASSWORD }} - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - - id: step-3 - name: Stop Daemon - run: ./gradlew --stop - - id: step-4 - name: Upload to Codecov.io - uses: codecov/codecov-action@v3 + ORG_GRADLE_PROJECT_spockBuildCacheUsername: '${{ secrets.SPOCK_BUILD_CACHE_USERNAME }}' + ORG_GRADLE_PROJECT_spockBuildCachePassword: '${{ secrets.SPOCK_BUILD_CACHE_PASSWORD }}' + GRADLE_ENTERPRISE_ACCESS_KEY: '${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}' + - id: 'step-3' + name: 'Stop Daemon' + run: './gradlew --stop' + - id: 'step-4' + name: 'Upload to Codecov.io' + uses: 'codecov/codecov-action@v3' release-spock: - name: Release Spock - runs-on: ${{ matrix.os }} + name: 'Release Spock' + runs-on: '${{ matrix.os }}' needs: - - build-and-verify - - check_yaml_consistency + - 'build-and-verify' strategy: matrix: os: - - ubuntu-latest + - 'ubuntu-latest' variant: - - 2.5 - - 3.0 - - 4.0 + - '2.5' + - '3.0' + - '4.0' java: - - 8 + - '8' steps: - - id: step-0 - name: Checkout Repository - uses: actions/checkout@v3 - - id: step-1 - name: Set up JDKs - uses: ./.github/actions/setup-build-env + - id: 'step-0' + name: 'Checkout Repository' + uses: 'actions/checkout@v3' + - id: 'step-1' + name: 'Set up JDKs' + uses: './.github/actions/setup-build-env' with: - additional-java-version: ${{ matrix.java }} - - id: step-2 - name: Publish Spock - uses: gradle/gradle-build-action@v2 + additional-java-version: '${{ matrix.java }}' + - id: 'step-2' + name: 'Publish Spock' + uses: 'gradle/gradle-build-action@v2' with: - arguments: --no-parallel --stacktrace ghActionsPublish "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}" -Dscan.tag.main-publish + arguments: '--no-parallel --stacktrace ghActionsPublish "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}" -Dscan.tag.main-publish' env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONATYPE_OSS_USER: ${{ secrets.SONATYPE_OSS_USER }} - SONATYPE_OSS_PASSWORD: ${{ secrets.SONATYPE_OSS_PASSWORD }} - SIGNING_PASSWORD: ${{ secrets.SIGNING_GPG_PASSWORD }} - ORG_GRADLE_PROJECT_spockBuildCacheUsername: ${{ secrets.SPOCK_BUILD_CACHE_USERNAME }} - ORG_GRADLE_PROJECT_spockBuildCachePassword: ${{ secrets.SPOCK_BUILD_CACHE_PASSWORD }} - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + SONATYPE_OSS_USER: '${{ secrets.SONATYPE_OSS_USER }}' + SONATYPE_OSS_PASSWORD: '${{ secrets.SONATYPE_OSS_PASSWORD }}' + SIGNING_PASSWORD: '${{ secrets.SIGNING_GPG_PASSWORD }}' + ORG_GRADLE_PROJECT_spockBuildCacheUsername: '${{ secrets.SPOCK_BUILD_CACHE_USERNAME }}' + ORG_GRADLE_PROJECT_spockBuildCachePassword: '${{ secrets.SPOCK_BUILD_CACHE_PASSWORD }}' + GRADLE_ENTERPRISE_ACCESS_KEY: '${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}' publish-release-docs: - name: Publish Release Docs - runs-on: ${{ matrix.os }} + name: 'Publish Release Docs' + runs-on: '${{ matrix.os }}' needs: - - release-spock - - check_yaml_consistency + - 'release-spock' strategy: matrix: os: - - ubuntu-latest + - 'ubuntu-latest' variant: - - 4.0 + - '4.0' java: - - 17 + - '17' steps: - - id: step-0 - name: Checkout Repository - uses: actions/checkout@v3 - - id: step-1 - name: Set up JDKs - uses: ./.github/actions/setup-build-env + - id: 'step-0' + name: 'Checkout Repository' + uses: 'actions/checkout@v3' + - id: 'step-1' + name: 'Set up JDKs' + uses: './.github/actions/setup-build-env' with: - additional-java-version: ${{ matrix.java }} - - id: step-2 - name: Create Temporary Branch - run: git checkout -b "docs-$GITHUB_SHA" - - id: step-3 - name: Publish Docs - uses: gradle/gradle-build-action@v2 + additional-java-version: '${{ matrix.java }}' + - id: 'step-2' + name: 'Create Temporary Branch' + run: 'git checkout -b "docs-$GITHUB_SHA"' + - id: 'step-3' + name: 'Publish Docs' + uses: 'gradle/gradle-build-action@v2' with: - arguments: --no-parallel --stacktrace ghActionsDocs "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}" -Dscan.tag.main-docs + arguments: '--no-parallel --stacktrace ghActionsDocs "-Dvariant=${{ matrix.variant }}" "-DjavaVersion=${{ matrix.java }}" -Dscan.tag.main-docs' env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ORG_GRADLE_PROJECT_spockBuildCacheUsername: ${{ secrets.SPOCK_BUILD_CACHE_USERNAME }} - ORG_GRADLE_PROJECT_spockBuildCachePassword: ${{ secrets.SPOCK_BUILD_CACHE_PASSWORD }} - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + ORG_GRADLE_PROJECT_spockBuildCacheUsername: '${{ secrets.SPOCK_BUILD_CACHE_USERNAME }}' + ORG_GRADLE_PROJECT_spockBuildCachePassword: '${{ secrets.SPOCK_BUILD_CACHE_PASSWORD }}' + GRADLE_ENTERPRISE_ACCESS_KEY: '${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}'