Unverified Commit c37c1fb6 authored by Daz DeBoer's avatar Daz DeBoer Committed by GitHub
Browse files

Merge pull request #294 from gradle/dd/dpe

Various improvements to CI workflows

- Compose all integ-test workflow executions into a single calling workflow
- Added a 'quick-check' workflow that provides faster feedback on branches other than main
  - Only runs on ubuntu-latest
  - Reuses cache entries from previous runs
  - Builds distribution outputs so that these don't need to be committed during everyday development
- Added a workflow for purging old workflow executions

Together with the fix for #293, these changes fix #291
parents 12be8b47 0c3292ab
Loading
Loading
Loading
Loading
+16
Changes for .github/actions/build-dist/action.yml: 16 added lines, 0 removed lines.
Original line number Diff line number Diff line
name: 'Build and upload distribution'
# Builds the action distribution an uploads as an artifact for later download
runs:
  using: "composite"
  steps: 
    - name: Build distribution
      shell: bash
      run: |
        npm install
        npm run all
    - name: Upload distribution
      uses: actions/upload-artifact@v2
      with:
        name: dist
        path: dist/
+12
Changes for .github/actions/download-dist/action.yml: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
name: 'Download dist'
# Downloads a 'dist' directory artifact that was uploaded in an earlier step
# We control this with an environment variable to allow for easier global configuration.
runs:
  using: "composite"
  steps: 
    - name: Download dist
      if: ${{ env.DOWNLOAD_DIST == 'true' }}
      uses: actions/download-artifact@v2
      with:
        name: dist
        path: dist/
+1 −1
Changes for .github/workflows/ci-codeql.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: codeql

on:
  push:
+66
Changes for .github/workflows/ci-full-check.yml: 66 added lines, 0 removed lines.
Original line number Diff line number Diff line
name: full-check

on:
  pull_request:
    types:
      - assigned
      - review_requested
  push:
    branches: 
      - main

jobs:
  action-inputs:
    uses: ./.github/workflows/integ-test-action-inputs.yml
    with:
      cache-key-prefix: ${{github.run_number}}-

  caching-config:
    uses: ./.github/workflows/integ-test-action-inputs-caching.yml
    with:
      cache-key-prefix: ${{github.run_number}}-

  execution-with-caching:
    uses: ./.github/workflows/integ-test-execution-with-caching.yml
    with:
      cache-key-prefix: ${{github.run_number}}-

  execution:
    uses: ./.github/workflows/integ-test-execution.yml
    with:
      cache-key-prefix: ${{github.run_number}}-

  gradle-versions:
    uses: ./.github/workflows/integ-test-gradle-versions.yml
    with:
      cache-key-prefix: ${{github.run_number}}-

  restore-configuration-cache:
    uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
    with:
      cache-key-prefix: ${{github.run_number}}-

  restore-custom-gradle-home:
    uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
    with:
      cache-key-prefix: ${{github.run_number}}-

  restore-gradle-home:
    uses: ./.github/workflows/integ-test-restore-gradle-home.yml
    with:
      cache-key-prefix: ${{github.run_number}}-

  restore-java-toolchain:
    uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
    with:
      cache-key-prefix: ${{github.run_number}}-

  sample-kotlin-dsl:
    uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
    with:
      cache-key-prefix: ${{github.run_number}}-

  sample-gradle-plugin:
    uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
    with:
      cache-key-prefix: ${{github.run_number}}-
+91
Changes for .github/workflows/ci-quick-check.yml: 91 added lines, 0 removed lines.
Original line number Diff line number Diff line
name: quick-check

on:
  push:
    branches-ignore: main

jobs:
  build-distribution:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout sources
      uses: actions/checkout@v2
    - name: Build and upload distribution
      uses: ./.github/actions/build-dist

  action-inputs:
    needs: build-distribution
    uses: ./.github/workflows/integ-test-action-inputs.yml
    with:
      runner-os: '["ubuntu-latest"]'
      download-dist: true

  caching-config:
    needs: build-distribution
    uses: ./.github/workflows/integ-test-action-inputs-caching.yml
    with:
      runner-os: '["ubuntu-latest"]'
      download-dist: true

  execution-with-caching:
    needs: build-distribution
    uses: ./.github/workflows/integ-test-execution-with-caching.yml
    with:
      runner-os: '["ubuntu-latest"]'
      download-dist: true

  execution:
    needs: build-distribution
    uses: ./.github/workflows/integ-test-execution.yml
    with:
      runner-os: '["ubuntu-latest"]'
      download-dist: true

  gradle-versions:
    needs: build-distribution
    uses: ./.github/workflows/integ-test-gradle-versions.yml
    with:
      runner-os: '["ubuntu-latest"]'
      download-dist: true

  # restore-configuration-cache:
  #   needs: build-distribution
  #   uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
  #   with:
  #     runner-os: '["ubuntu-latest"]'
  #     download-dist: true

  restore-custom-gradle-home:
    needs: build-distribution
    uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
    with:
      runner-os: '["ubuntu-latest"]'
      download-dist: true

  restore-gradle-home:
    needs: build-distribution
    uses: ./.github/workflows/integ-test-restore-gradle-home.yml
    with:
      runner-os: '["ubuntu-latest"]'
      download-dist: true

  restore-java-toolchain:
    needs: build-distribution
    uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
    with:
      runner-os: '["ubuntu-latest"]'
      download-dist: true

  sample-kotlin-dsl:
    needs: build-distribution
    uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
    with:
      runner-os: '["ubuntu-latest"]'
      download-dist: true

  sample-gradle-plugin:
    needs: build-distribution
    uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
    with:
      runner-os: '["ubuntu-latest"]'
      download-dist: true
Loading