-
Notifications
You must be signed in to change notification settings - Fork 44
Moved Format and Check to their own jobs to reduce mail notifications for deployment approval #148
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
Closed
Closed
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9ad3976
moved check and format to their own jobs
robgruen 89bb9ab
removed check and format
robgruen b4a9359
Update CI job name format
robgruen 943b32f
Update ci.yml
robgruen 094b369
Merge branch 'main' into dev/robgruen/workflow_update3
robgruen 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 hidden or 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 |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ name: CI | |
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| branches: [ "main", "dev/robgruen/workflow_update3" ] | ||
| pull_request_target: | ||
| branches: [ "main" ] | ||
| workflow_dispatch: # manual run | ||
|
|
@@ -44,25 +44,21 @@ jobs: | |
| echo "${{ github.triggering_actor }} does not have permissions on this repo." | ||
| echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}" | ||
| echo "Job originally triggered by ${{ github.actor }}" | ||
| exit 1 | ||
| exit 1 | ||
|
|
||
| ci: | ||
| needs: permissions-check | ||
| environment: | ||
| name: build-pipeline | ||
| check: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest] | ||
| python-version: ['3.12', '3.13', '3.14'] | ||
| task: [check, test, format] | ||
| exclude: | ||
| - os: windows-latest | ||
| python-version: '3.13' | ||
| - os: windows-latest | ||
| python-version: '3.14' | ||
| runs-on: ${{ matrix.os }} | ||
| name: ${{ matrix.os }} ${{ matrix.task }} (py ${{ matrix.python-version }}) | ||
| name: ${{ matrix.os }} check (py ${{ matrix.python-version }}) | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
@@ -84,32 +80,94 @@ jobs: | |
|
|
||
| - name: Run Check | ||
| shell: bash | ||
| if: matrix.task == 'check' | ||
| run: | | ||
| uv run pyright src tests tools examples | ||
|
|
||
| format: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest] | ||
| python-version: ['3.12', '3.13', '3.14'] | ||
| exclude: | ||
| - os: windows-latest | ||
| python-version: '3.13' | ||
| - os: windows-latest | ||
| python-version: '3.14' | ||
| runs-on: ${{ matrix.os }} | ||
| name: ${{ matrix.os }} format (py ${{ matrix.python-version }}) | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha || github.ref }} | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
|
|
||
| - name: Install Dependencies | ||
| shell: bash | ||
| run: | | ||
| uv sync --extra dev | ||
|
|
||
| - name: Run Format | ||
| shell: bash | ||
| if: matrix.task == 'format' | ||
| run: | | ||
| uv run black -tpy312 -tpy313 -tpy314 src tests tools examples --check | ||
|
|
||
| test: | ||
| needs: permissions-check | ||
| environment: | ||
| name: build-pipeline | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest] | ||
| python-version: ['3.12', '3.13', '3.14'] | ||
| exclude: | ||
| - os: windows-latest | ||
| python-version: '3.13' | ||
| - os: windows-latest | ||
| python-version: '3.14' | ||
| runs-on: ${{ matrix.os }} | ||
| name: ${{ matrix.os }} (py ${{ matrix.python-version }}) | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha || github.ref }} | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
|
|
||
| - name: Install Dependencies | ||
| shell: bash | ||
| run: | | ||
| uv sync --extra dev | ||
|
|
||
| - name: Login to Azure | ||
| if: matrix.task == 'test' | ||
| uses: azure/[email protected] | ||
| with: | ||
| client-id: ${{ secrets.AZURE_CLIENTID }} | ||
| tenant-id: ${{ secrets.AZURE_TENANTID }} | ||
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTIONID }} | ||
|
|
||
| - name: Get Keys | ||
| if: matrix.task == 'test' | ||
| run: | | ||
| uv run python tools/get_keys.py --vault build-pipeline-kv | ||
|
|
||
| - name: Run Test | ||
| shell: bash | ||
| if: matrix.task == 'test' | ||
| run: | | ||
| uv run pytest | ||
|
|
||
|
|
||
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.
@robgruen Can you delete your branch from the list? Then I can merge it for you. (If I were to make the change myself we might end up in a situation where only a 3rd owner can merge it...)
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.
Maybe also un-draft it. But only when you're happy with this step. (I am!)
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.
done.