-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add pruning support in the pipeline for CI to aid with speed #604
Merged
+112
−9
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c3eb599
Add pruning support in the pipeline for CI to aid with speed
SorsOps 7de628e
Add gitkeep for out
SorsOps 9d7734d
Fix schema being incorrect for a token set
SorsOps 3565f89
Upgrade turbo
SorsOps 454a7ae
Merge remote-tracking branch 'remotes/origin/master' into feat/pruning
SorsOps File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@tokens-studio/graph-engine-nodes-design-tokens": patch | ||
--- | ||
|
||
Fixes the incorrectly typed Tokenset Schema | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
name: CI | ||
|
||
on: pull_request | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
env: | ||
HUSKY: 0 | ||
|
@@ -16,9 +18,82 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
|
||
changes: | ||
runs-on: ubuntu-latest | ||
env: | ||
TURBO_RUN_FILTER: ${{ github.event_name == 'pull_request' && '...[origin/master]' || '...[HEAD^]' }} | ||
# Required permissions | ||
permissions: | ||
pull-requests: read | ||
# Set job outputs to values from filter step | ||
outputs: | ||
flat: ${{ steps.flat.outputs.result }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
lfs: true | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: 'npm' | ||
node-version: 20 | ||
- name: Install [email protected] & glob | ||
run: | | ||
npm i -g [email protected] glob | ||
echo "PATH=$(npm config get config):$PATH" >> $GITHUB_ENV | ||
|
||
- name: Verify turbo installation | ||
shell: bash | ||
run: | | ||
source $GITHUB_ENV | ||
turbo --version | ||
- name: Debug TURBO_RUN_FILTER | ||
run: echo "TURBO_RUN_FILTER is $TURBO_RUN_FILTER" | ||
- name: Validate JSON Output | ||
run: | | ||
content=$(turbo build --filter=$TURBO_RUN_FILTER --dry-run=json) | ||
echo $content | jq . | ||
- name: Debug turbo command | ||
run: | | ||
set -x | ||
turbo build --filter=$TURBO_RUN_FILTER --dry-run=json | ||
set +x | ||
- name: Verify turbo installation | ||
run: which turbo | ||
|
||
- name: Debug content | ||
run: | | ||
content=`turbo build --filter=$TURBO_RUN_FILTER --dry-run=json` | ||
echo "Content is: $content" | ||
- name: Changeset | ||
id: changeset | ||
run: | | ||
content=`turbo build --filter=$TURBO_RUN_FILTER --dry-run=json` | ||
content="${content//'%'/'%25'}" | ||
content="${content//$'\n'/'%0A'}" | ||
content="${content//$'\r'/'%0D'}" | ||
echo "::set-output name=result::$content" | ||
- name: Flat output | ||
id: flat | ||
run: | | ||
filteredPkgs=`turbo build --filter=$TURBO_RUN_FILTER --dry-run=json | node ./scripts/diff.js` | ||
echo "::set-output name=result::$filteredPkgs" | ||
echo "$filteredPkgs" | ||
|
||
|
||
verify: | ||
name: Verify changes | ||
needs: changes | ||
runs-on: ubuntu-latest | ||
if: ${{ needs.changes.outputs.flat != '[]' }} | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./out | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
@@ -32,7 +107,10 @@ jobs: | |
cache: "yarn" | ||
|
||
- name: Install turbo | ||
run: yarn global add [email protected] | ||
run: yarn global add [email protected] | ||
- name: prune | ||
run: turbo prune ${{ needs.changes.outputs.flat }} | ||
working-directory: ./ | ||
|
||
- name: Turbo Cache | ||
id: turbo-cache | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ | |
"husky": "^8.0.3", | ||
"lint-staged": "^13.2.1", | ||
"listr2": "5.0.8", | ||
"turbo": "^1.9.8" | ||
"turbo": "^1.13.3" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const stdin = process.openStdin(); | ||
|
||
let data = ''; | ||
|
||
stdin.on('data', function (chunk) { | ||
data += chunk; | ||
}); | ||
|
||
stdin.on('end', function () { | ||
const input = JSON.parse(data); | ||
const flatpack = input.tasks.reduce((acc, task) => { | ||
if (task.command == '\u003cNONEXISTENT\u003e') { | ||
return acc; | ||
} | ||
|
||
if (task.cache.status == 'MISS') { | ||
acc.push(task.package); | ||
} | ||
return acc; | ||
}, []); | ||
|
||
const uniq = [...new Set(flatpack)]; | ||
console.log(uniq.join(' ')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21482,7 +21482,7 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.13.4.tgz#0adfddb0d6c167a46ecff646666e347a7d372d76" | ||
integrity sha512-u5A+VOKHswJJmJ8o8rcilBfU5U3Y1TTAfP9wX8bFh8teYF1ghP0EhtMRLjhtp6RPa+XCxHHVA2CiC3gbh5eg5g== | ||
|
||
turbo@^1.9.8: | ||
turbo@^1.13.3: | ||
version "1.13.4" | ||
resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.13.4.tgz#06767fff53f0aae43f78e12e5ac7d5e7652d40d0" | ||
integrity sha512-1q7+9UJABuBAHrcC4Sxp5lOqYS5mvxRrwa33wpIyM18hlOCpRD/fTJNxZ0vhbMcJmz15o9kkVm743mPn7p6jpQ== | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this also include some info of the pipeline change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, nothing within the packages changes from the pipeline change, this is only for customer facing info