From 679b4f62df6043612748f9aa2108ed85c688330e Mon Sep 17 00:00:00 2001 From: David Arthur Date: Thu, 13 Feb 2025 13:03:36 -0500 Subject: [PATCH 1/4] switch jobs --- .github/workflows/ci.yml | 35 +++---------------------------- .github/workflows/merge-queue.yml | 26 ----------------------- 2 files changed, 3 insertions(+), 58 deletions(-) delete mode 100644 .github/workflows/merge-queue.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c38e80..6a65ad0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,26 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: CI +name: Validate Patch on: - push: - branches: - - 'trunk' - - '4.0' - - schedule: - - cron: '0 0 * * 6,0' # Run on Saturday and Sunday at midnight UTC - pull_request: types: [ opened, synchronize, ready_for_review, reopened ] - branches: - - 'trunk' - - '4.0' + branches: ["main"] merge_group: - types: - - checks_requested + types: [checks_requested] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -40,24 +29,6 @@ concurrency: jobs: validate-patch: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Display info - run: | - pwd - tree -a -I '.git' - echo "Action: ${{ github.event.action }}" - echo "Sender: ${{ github.event.sender.login }}" - git status - git log origin/main..HEAD - - name: Validate files - run: sleep 5 - - build: uses: ./.github/workflows/build.yml with: is-trunk: ${{ github.ref == 'refs/heads/trunk' }} diff --git a/.github/workflows/merge-queue.yml b/.github/workflows/merge-queue.yml deleted file mode 100644 index d43b5e4..0000000 --- a/.github/workflows/merge-queue.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Validate Patch - -on: - pull_request: - branches: [ "main" ] - merge_group: - types: [checks_requested] - -jobs: - validate-patch: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Display info - run: | - pwd - tree -a -I '.git' - echo "Action: ${{ github.event.action }}" - echo "Sender: ${{ github.event.sender.login }}" - git status - git log origin/main..HEAD - - name: Validate files - run: sleep 5 From 8c54afb77eb000cae8142957323104392c229a72 Mon Sep 17 00:00:00 2001 From: David Arthur Date: Thu, 13 Feb 2025 15:31:11 -0500 Subject: [PATCH 2/4] skip tests for merge queue --- .github/workflows/build.yml | 5 ++++- .github/workflows/ci.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13f5cb4..96aab23 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,9 @@ on: description: "Is this CI run from a public fork?" default: true type: boolean + run-tests: + default: true + type: boolean jobs: validate: @@ -102,7 +105,7 @@ jobs: test: needs: [validate] - if: ${{ ! needs.validate.outputs.is-draft }} + if: ${{ ! needs.validate.outputs.is-draft && inputs.run-tests }} runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a65ad0..30a3b1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,5 +33,6 @@ jobs: with: is-trunk: ${{ github.ref == 'refs/heads/trunk' }} is-public-fork: ${{ github.event.pull_request.head.repo.fork || false }} + run-tests: ${{ github.event == 'pull_request' }} secrets: inherit From cdace373c84439c675d4315d3ef78c99ce5d0121 Mon Sep 17 00:00:00 2001 From: David Arthur Date: Thu, 13 Feb 2025 15:33:05 -0500 Subject: [PATCH 3/4] skip tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30a3b1f..184ed6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,6 @@ jobs: with: is-trunk: ${{ github.ref == 'refs/heads/trunk' }} is-public-fork: ${{ github.event.pull_request.head.repo.fork || false }} - run-tests: ${{ github.event == 'pull_request' }} + run-tests: false secrets: inherit From 3b6c47c7b6fffe09f1b9424af9e585c0354d16fb Mon Sep 17 00:00:00 2001 From: David Arthur Date: Thu, 13 Feb 2025 18:04:34 -0500 Subject: [PATCH 4/4] trying something --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 184ed6a..c27f431 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,23 @@ concurrency: jobs: validate-patch: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Display info + run: | + pwd + tree -a -I '.git' + echo "Action: ${{ github.event.action }}" + echo "Sender: ${{ github.event.sender.login }}" + git status + git log origin/main..HEAD + - name: Validate files + run: sleep 5 + build: uses: ./.github/workflows/build.yml with: is-trunk: ${{ github.ref == 'refs/heads/trunk' }}