Skip to content

Commit

Permalink
ci: Apply Graphite CI Optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Jul 17, 2024
1 parent 735f737 commit c07d8f3
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,24 @@ concurrency:
cancel-in-progress: true

jobs:
optimize-ci:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check_skip.outputs.skip }}
steps:
- name: Optimize CI
id: check_skip
uses: withgraphite/graphite-ci-action@main
with:
graphite_token: ${{ secrets.GRPAHITE_CI_OPTIMIZER_TOKEN }}
lint:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') && !contains(fromJSON('["flow:merge-queue", "flow:hotfix"]'), github.event.label.name) && github.event.pull_request.merged == false }}
if: |
${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci')
&& !contains(fromJSON('["flow:merge-queue", "flow:hotfix"]'), github.event.label.name)
&& github.event.pull_request.merged == false
&& needs.optimize-ci.outputs.skip == 'false'
}}
needs: [optimize-ci]
runs-on: ubuntu-latest
steps:
- name: Calculate the fetch depth
Expand Down Expand Up @@ -81,7 +97,13 @@ jobs:


typecheck:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') && !contains(fromJSON('["flow:merge-queue", "flow:hotfix"]'), github.event.label.name) && github.event.pull_request.merged == false }}
if: |
${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci')
&& !contains(fromJSON('["flow:merge-queue", "flow:hotfix"]'), github.event.label.name)
&& github.event.pull_request.merged == false
&& needs.optimize-ci.outputs.skip == 'false'
}}
needs: [optimize-ci]
runs-on: ubuntu-latest
steps:
- name: Calculate the fetch depth
Expand Down Expand Up @@ -146,7 +168,13 @@ jobs:


test:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') && !contains(fromJSON('["flow:merge-queue", "flow:hotfix"]'), github.event.label.name) && github.event.pull_request.merged == false }}
if: |
${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci')
&& !contains(fromJSON('["flow:merge-queue", "flow:hotfix"]'), github.event.label.name)
&& github.event.pull_request.merged == false
&& needs.optimize-ci.outputs.skip == 'false'
}}
needs: [optimize-ci]
runs-on: [ubuntu-latest-8-cores]
steps:
- name: Calculate the fetch depth
Expand Down

0 comments on commit c07d8f3

Please sign in to comment.