-
-
Notifications
You must be signed in to change notification settings - Fork 47.7k
Update build.yml #12913
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
Update build.yml #12913
Changes from 5 commits
7450df5
1bcbab1
3ae98df
10e58eb
ff8f54c
263ddaa
bc45977
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,70 @@ | ||
name: "build" | ||
name: "Build CI/CD PipeLine" | ||
|
||
on: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" # Run everyday | ||
push: | ||
branches: [main, develop] | ||
paths-ignore: | ||
- "*.md" | ||
- "docs/**" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why ignore these? |
||
|
||
pull_request: | ||
branches: [main] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This repo has no |
||
types: [opened, synchronize, reopened] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why these? |
||
paths-ignore: | ||
- "*.md" | ||
- "docs/**" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why ignore these? |
||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this blank line? |
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This step only has a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
- uses: actions/checkout@v5 | ||
- uses: astral-sh/setup-uv@v6 | ||
|
||
- name: Set up uv | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
- uses: astral-sh/setup-uv@v3 | ||
with: | ||
enable-cache: true | ||
cache-dependency-glob: uv.lock | ||
cache-dependency-glob: | | ||
**/uv.lock | ||
**/pyproject.toml | ||
- name: Set up Python | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
python-version: 3.11 | ||
allow-prereleases: true | ||
- run: uv sync --group=test | ||
- name: Install dependencies | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
- run: | | ||
uv sync --all-extras | ||
uv pip list | ||
Comment on lines
+43
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not helpful. This has the potential to slow down the build and generate longer logs, which will go unread. |
||
- name: Lint code | ||
run: uv run ruff check . --output-format=github | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why run ruff again? It is already run in the |
||
- name: Run tests | ||
# TODO: #8818 Re-enable quantum tests | ||
run: uv run pytest | ||
--ignore=computer_vision/cnn_classification.py | ||
--ignore=docs/conf.py | ||
--ignore=dynamic_programming/k_means_clustering_tensorflow.py | ||
--ignore=machine_learning/lstm/lstm_prediction.py | ||
--ignore=neural_network/input_data.py | ||
--ignore=project_euler/ | ||
--ignore=quantum/q_fourier_transform.py | ||
--ignore=scripts/validate_solutions.py | ||
--ignore=web_programming/current_stock_price.py | ||
--ignore=web_programming/fetch_anime_and_play.py | ||
--cov-report=term-missing:skip-covered | ||
--cov=. . | ||
- if: ${{ success() }} | ||
run: scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md | ||
Comment on lines
-37
to
-38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
run: | | ||
uv run pytest \ | ||
--ignore=computer_vision/cnn_classification.py \ | ||
--ignore=docs/conf.py \ | ||
--ignore=dynamic_programming/k_means_clustering_tensorflow.py \ | ||
--ignore=machine_learning/lstm/lstm_prediction.py \ | ||
--ignore=neural_network/input_data.py \ | ||
--ignore=project_euler/ \ | ||
--ignore=quantum/q_fourier_transform.py \ | ||
--ignore=scripts/validate_solutions.py \ | ||
--ignore=web_programming/current_stock_price.py \ | ||
--ignore=web_programming/fetch_anime_and_play.py \ | ||
--cov-report=term-missing:skip-covered \ | ||
--cov=. . | ||
|
||
- name: Build package (if needed) | ||
run: uv build | ||
if: ${{ success() }} | ||
|
||
- name: Generate Directory Markdoun | ||
run: python scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md | ||
|
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.
This repo has no
main
ordevelop
branch, so this change disables all push testing.