-
Notifications
You must be signed in to change notification settings - Fork 20
Make semaphore pipeline run less frequently, reduce machine sizes, avoid clearing cache #362
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
base: master
Are you sure you want to change the base?
Conversation
…oid clearing cache
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.
Pull Request Overview
This PR optimizes the Semaphore CI pipeline by making it run less frequently, reducing machine resource usage, and removing cache clearing operations. The changes are aimed at improving efficiency and reducing costs while maintaining test coverage.
- Adds conditional execution rules to prevent unnecessary pipeline runs on version tags
- Downgrades machine types from size-2 to size-1 for resource optimization
- Removes cache clearing step to improve build performance
Comments suppressed due to low confidence (1)
.semaphore/semaphore.yml:1
- The same conditional logic is repeated multiple times. Consider defining this as a YAML anchor or variable to reduce duplication and make maintenance easier.
# This file is managed by ServiceBot plugin - Semaphore. The content in this file is created using a common
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
.semaphore/semaphore.yml
Outdated
|
||
blocks: | ||
- name: "Linux amd64 (musl): Build and test" | ||
run: | ||
when: "change_in('['/package.json', '/deps', '/lib', '/src', '/test']') AND tag !~ '^v[0-9]\\.'" |
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.
The change_in condition uses an array syntax with single quotes inside double quotes, which may cause parsing issues. Consider using proper YAML array syntax: change_in(['/package.json', '/deps', '/lib', '/src', '/test'])
Copilot uses AI. Check for mistakes.
.semaphore/semaphore.yml
Outdated
@@ -48,6 +49,8 @@ blocks: | |||
- docker run -v "$(pwd):/v" node:18-alpine /v/.semaphore/build-docker-alpine.sh | |||
|
|||
- name: "Linux arm64 (musl): Build and test" | |||
run: | |||
when: "change_in('['/package.json', '/deps', '/lib', '/src', '/test']') AND tag !~ '^v[0-9]\\.'" |
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.
The same conditional logic is repeated multiple times. Consider defining this as a YAML anchor or variable to reduce duplication and make maintenance easier.
Copilot uses AI. Check for mistakes.
.semaphore/semaphore.yml
Outdated
- name: "Linux arm64: Build and test" | ||
- name: "Linux amd64: Build and test" | ||
run: | ||
when: "change_in('['/package.json', '/deps', '/lib', '/src', '/test']') AND tag !~ '^v[0-9]\\.'" |
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.
The same conditional logic is repeated multiple times. Consider defining this as a YAML anchor or variable to reduce duplication and make maintenance easier.
Copilot uses AI. Check for mistakes.
.semaphore/semaphore.yml
Outdated
@@ -75,6 +80,8 @@ blocks: | |||
- make test | |||
|
|||
- name: 'macOS arm64/m1: Build and test' | |||
run: | |||
when: "change_in('['/package.json', '/deps', '/lib', '/src', '/test']') AND tag !~ '^v[0-9]\\.'" |
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.
The same conditional logic is repeated multiple times. Consider defining this as a YAML anchor or variable to reduce duplication and make maintenance easier.
Copilot uses AI. Check for mistakes.
.semaphore/semaphore.yml
Outdated
@@ -146,6 +157,8 @@ blocks: | |||
- make integtest | |||
|
|||
- name: "Linux amd64: Performance" | |||
run: | |||
when: "change_in('['/package.json', '/deps', '/lib', '/src', '/ci/tests']') AND tag !~ '^v[0-9]\\.'" |
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.
The same conditional logic is repeated multiple times. Consider defining this as a YAML anchor or variable to reduce duplication and make maintenance easier.
Copilot uses AI. Check for mistakes.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
.semaphore/semaphore.yml
Outdated
@@ -48,6 +49,8 @@ blocks: | |||
- docker run -v "$(pwd):/v" node:18-alpine /v/.semaphore/build-docker-alpine.sh | |||
|
|||
- name: "Linux arm64 (musl): Build and test" | |||
run: | |||
when: "change_in(['/package.json', '/lib', '/src', '/test']) AND tag !~ '^v[0-9]\\.' AND branch != 'master'" |
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.
We should run tests on master commits as it's possible squash and merge succeeds and there are no conflicts but code isn't rebased before that.
List of changes for making pipeline more efficient: