Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: streamline CI workflows #1392

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/workflows/apix-ci.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
name: API Explorer CI
on:
pull_request:
paths:
- package.json
- packages/code-editor/**
- packages/run-it/**
- packages/api-explorer/**
- packages/extension-api-explorer/**
- packages/extension-utils/**
- .github/workflows/apix-ci.yml

push:
branches:
- main
paths:
- package.json
- packages/code-editor/**
- packages/run-it/**
- packages/api-explorer/**
- packages/extension-api-explorer/**
- packages/extension-utils/**
- .github/workflows/apix-ci.yml

workflow_dispatch:

env:
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/codegen-ci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
name: Codegen CI
on:
pull_request:
paths:
- package.json
- packages/sdk-codegen/**
- packages/sdk-codegen-utils/**
- packages/sdk-codegen-scripts/**
- .github/workflows/codegen-ci.yml

push:
branches:
- main
paths:
- package.json
- packages/sdk-codegen/**
- packages/sdk-codegen-utils/**
- packages/sdk-codegen-scripts/**
- .github/workflows/codegen-ci.yml

workflow_dispatch:

env:
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
name: Go SDK CI
on:
pull_request:
paths:
- go/**
- .github/workflows/go-ci.yml

push:
branches:
- main
paths:
- go/**
- .github/workflows/go-ci.yml

workflow_dispatch:

env:
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/hackathon-ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
name: Hackathon CI
on:
pull_request:
paths:
- package.json
- packages/wholly-artifact/**
- packages/hackathon/**
- .github/workflows/hackathon-ci.yml

push:
branches:
- main
paths:
- package.json
- packages/wholly-artifact/**
- packages/hackathon/**
- .github/workflows/hackathon-ci.yml

workflow_dispatch:

env:
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
name: Python CI
on:
pull_request:
paths:
- python/**
- .github/workflows/python-ci.yml

push:
branches:
- main
paths:
- python/**
- .github/workflows/python-ci.yml

workflow_dispatch:

env:
Expand Down
104 changes: 99 additions & 5 deletions .github/workflows/required-checks-hack-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

name: Required Checks Hack
on:
workflow_dispatch:

pull_request:

push:
Expand All @@ -29,6 +31,7 @@ on:

permissions:
checks: write
actions: write

jobs:
satisfy-required-checks:
Expand Down Expand Up @@ -92,8 +95,43 @@ jobs:
echo "resources: ${{ steps.filter.outputs.resources }}"
echo "tssdk: ${{ steps.filter.outputs.tssdk }}"
echo "gosdk: ${{ steps.filter.outputs.gosdk }}"
echo "ref: ${{ github.ref }}"


- name: Lookup Workflows
id: lookup_workflows
run: |
response=$(curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/looker-open-source/sdk-codegen/actions/workflows)
echo "workflows=$(jq -c '.workflows | map({id: .id,name: .name})' <<< $response)"
echo "workflows=$(jq -c '.workflows | map({id: .id,name: .name})' <<< $response)" >> "$GITHUB_OUTPUT"

- name: Trigger Automation Workflow
uses: benc-uk/workflow-dispatch@v1
if: false
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: 'Codegen CI'
ref: ${{ github.event.pull_request.head.ref }}

- name: Create Codegen check
if: steps.filter.outputs.codegen != 'false'
run: |
workflow_id=$(echo '${{ steps.lookup_workflows.outputs.workflows }}' | jq '.[] | select( .name == "Codegen CI" ) .id')
echo "workflow_id: $workflow_id"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/looker-open-source/sdk-codegen/actions/workflows/$workflow_id/dispatches \
-d "{\"ref\": \"${{ github.event.pull_request.head.ref || github.ref }}\"}" \
--fail-with-body

- name: Create No Op Codegen check
if: steps.filter.outputs.codegen == 'false'
run: |
curl --request POST \
Expand All @@ -110,9 +148,23 @@ jobs:
},
"conclusion": "success"
}' \
--fail
--fail-with-body

- name: Create Typescript check
if: steps.filter.outputs.tssdk != 'false'
run: |
workflow_id=$(echo '${{ steps.lookup_workflows.outputs.workflows }}' | jq '.[] | select( .name == "TypeScript SDK CI" ) .id')
echo "workflow_id: $workflow_id"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/looker-open-source/sdk-codegen/actions/workflows/$workflow_id/dispatches \
-d "{\"ref\": \"${{ github.event.pull_request.head.ref || github.ref }}\"}" \
--fail-with-body

- name: Create No Op Typescript check
if: steps.filter.outputs.tssdk == 'false'
run: |
curl --request POST \
Expand All @@ -129,9 +181,23 @@ jobs:
},
"conclusion": "success"
}' \
--fail
--fail-with-body

- name: Create Python check
if: steps.filter.outputs.python != 'false'
run: |
workflow_id=$(echo '${{ steps.lookup_workflows.outputs.workflows }}' | jq '.[] | select( .name == "Python CI" ) .id')
echo "workflow_id: $workflow_id"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/looker-open-source/sdk-codegen/actions/workflows/$workflow_id/dispatches \
-d "{\"ref\": \"${{ github.event.pull_request.head.ref || github.ref }}\"}" \
--fail-with-body

- name: Create No Op Python check
if: steps.filter.outputs.python == 'false'
run: |
curl --request POST \
Expand All @@ -148,9 +214,23 @@ jobs:
},
"conclusion": "success"
}' \
--fail
--fail-with-body

- name: Create APIX check
if: steps.filter.outputs.apix != 'false'
run: |
workflow_id=$(echo '${{ steps.lookup_workflows.outputs.workflows }}' | jq '.[] | select( .name == "API Explorer CI" ) .id')
echo "workflow_id: $workflow_id"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/looker-open-source/sdk-codegen/actions/workflows/$workflow_id/dispatches \
-d "{\"ref\": \"${{ github.event.pull_request.head.ref || github.ref }}\"}" \
--fail-with-body

- name: Create No Op APIX check
if: steps.filter.outputs.apix == 'false'
run: |
curl --request POST \
Expand All @@ -167,9 +247,23 @@ jobs:
},
"conclusion": "success"
}' \
--fail
--fail-with-body

- name: Create Go check
if: steps.filter.outputs.gosdk != 'false'
run: |
workflow_id=$(echo '${{ steps.lookup_workflows.outputs.workflows }}' | jq '.[] | select( .name == "Go SDK CI" ) .id')
echo "workflow_id: $workflow_id"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/looker-open-source/sdk-codegen/actions/workflows/$workflow_id/dispatches \
-d "{\"ref\": \"${{ github.event.pull_request.head.ref || github.ref }}\"}" \
--fail-with-body

- name: Create No Op Go check
if: steps.filter.outputs.gosdk == 'false'
run: |
curl --request POST \
Expand All @@ -186,4 +280,4 @@ jobs:
},
"conclusion": "success"
}' \
--fail
--fail-with-body
14 changes: 0 additions & 14 deletions .github/workflows/resources-ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
name: Resources Index CI
on:
pull_request:
paths:
- bin/looker-resources-index/**
- docs/resources/**
- .github/workflows/resources-ci.yml

push:
branches:
- main
paths:
- bin/looker-resources-index/**
- docs/resources/**
- .github/workflows/resources-ci.yml

workflow_dispatch:

defaults:
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/tssdk-ci.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
name: TypeScript SDK CI
on:
pull_request:
paths:
- package.json
- packages/sdk/**
- packages/sdk-rtl/**
- packages/sdk-node/**
- packages/extension-sdk/**
- packages/extension-sdk-react/**
- packages/extension-utils/**
- .github/workflows/tssdk-ci.yml

push:
branches:
- main
paths:
- package.json
- packages/sdk/**
- packages/sdk-rtl/**
- packages/sdk-node/**
- packages/extension-sdk/**
- packages/extension-sdk-react/**
- packages/extension-utils/**
- .github/workflows/tssdk-ci.yml

workflow_dispatch:

env:
Expand Down
Loading