-
-
Notifications
You must be signed in to change notification settings - Fork 50.4k
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 3 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,24 +1,53 @@ | ||
| name: "build" | ||
| name: "Build CI/CD PipeLine" | ||
|
|
||
| on: | ||
| pull_request: | ||
| schedule: | ||
| - cron: "0 0 * * *" # Run everyday | ||
| push: | ||
| branches: [main, develop] | ||
| paths-ignore: | ||
| - "*.md" | ||
| - "docs/**" | ||
|
Member
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] | ||
|
Member
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] | ||
|
Member
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/**" | ||
|
Member
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 * * *" | ||
|
|
||
|
Member
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: | ||
| - uses: actions/checkout@v5 | ||
| - name: Checkout Repository | ||
|
Member
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
Author
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
Member
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@v4 | ||
| - uses: astral-sh/setup-uv@v6 | ||
| - name: Set up uv | ||
|
Member
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 | ||
|
Member
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
Member
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 | ||
|
Member
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. What does the comma (,) do on this line?
Author
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 .
Member
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. Is the . useful? If not, let's remove it. |
||
| - name: Run tests | ||
| # TODO: #8818 Re-enable quantum tests | ||
| run: uv run pytest | ||
|
|
@@ -34,5 +63,8 @@ jobs: | |
| --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() }} | ||
| run: 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
mainordevelopbranch, so this change disables all push testing.