-
Couldn't load subscription status.
- Fork 1
New process for running tests and publishing breadbox client #437
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
Merged
Merged
Changes from 47 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
13918ef
WIP: Setting up a new build process for breadbox_client
invalid-email-address 71df4c3
github workflow fix
pgm 78cdbb5
added yaml as a file to monitor
pgm 51daeba
Changed breadbox_client tests to spin up a breadbox instance on demand
pgm fe958ae
fixed pyright errors
pgm 7434898
If reading settings fails, leave celery unconfigured
pgm b16631a
added httpx dependency
pgm 13d1aca
added install of breadbox
pgm 50d03a4
Bumping poetry version in case that helps
pgm 98385ec
more debugging build
pgm 7fd1c0f
more debugging build
pgm 6bf82c2
more debugging build
pgm 152fdf0
more debugging build
pgm ee6cc36
more debugging
pgm 7305b1b
more debugging
pgm c31c4b5
more debugging
pgm ea35d8c
more debugging build
pgm 59f76f6
more debugging build
pgm dfedb15
more debugging build
pgm 80262f3
more debugging build
pgm ed2a3ac
more debugging build
pgm 3f5da6f
more debugging build
pgm b0d6d59
added a new function for running a poetry command in virtual env
pgm 456067b
added a new function for running a poetry command in virtual env
pgm d7adc02
added a new function for running a poetry command in virtual env
pgm 9a83409
added a new function for running a poetry command in virtual env
pgm 5892807
added a new function for running a poetry command in virtual env
pgm 50afb4d
added a new function for running a poetry command in virtual env
pgm 4d73e62
Dropped unused settings variables for configuring broker url and backend
pgm 6906bc0
If reading settings fails, leave celery unconfigured
pgm b4c3d25
Added documentation and reverted some unneeded changes.
pgm bd77d14
Added documentation and reverted some unneeded changes.
pgm f747f87
removed all cz references from pyproject files
pgm bd3214f
feat: add version bumping script for breadbox-client package
pgm 76a3cb7
refactor: update version bumping and publishing scripts with improved…
pgm 40cbe05
fix: resolve syntax errors in version bump script
pgm 759e814
feat: add detailed print statements for better script debugging and u…
pgm 200cac4
feat: add --dryrun option to skip commits and publishing in version b…
pgm 07d0077
docs: add script documentation and usage overview
pgm 5320ac7
refactor: update conventional commit types and handling
pgm 7d88e12
Removal of cz and in its place, run the new bump_version_and_publish …
pgm ad945ca
feat: add `--dry-run-if-not-branch` option to conditionally run in dr…
pgm 2a3e976
refactor: remove unused import from version bump script
pgm 2dc5873
fix: raise assertion error when no previous version tag is found
pgm c887cd1
refactor: print original commit subject instead of rule number
pgm 8f61ea9
fix(breadbox): Added fixes to bump script
pgm 3a4a9cf
Added --dry-run-if-not-branch to github workflow for breadbox client
pgm 9dbaa00
removed unneeded build yamls
pgm f7cb481
Removed spurious comment
pgm 62a2ba9
added debugging statement
pgm b59ecc1
Revert "added debugging statement"
pgm 9f00134
Removed debugging print statements as well as spurious "todo" comment
pgm 68bd052
Merge branch 'master' into new-bb-client-publisher
pgm d3c2f63
Merge branch 'master' into new-bb-client-publisher
pgm 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
Some comments aren't visible on the classic Files Changed page.
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
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 |
|---|---|---|
|
|
@@ -61,22 +61,6 @@ jobs: | |
| - name: Check PR title | ||
| run: poetry run cz check -m '${{ github.event.pull_request.title }}' | ||
|
|
||
| pyright-breadbox-client: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: "Check out" | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| token: "${{ secrets.GITHUB_TOKEN }}" | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Prepare breadbox client | ||
| uses: ./.github/actions/prepare-breadbox-client # checks out and generates breadbox client code | ||
|
|
||
| - name: Check that the breadbox client passes pyright | ||
| working-directory: ./breadbox-client | ||
| run: "poetry install && poetry run pyright breadbox_facade" | ||
|
|
||
| build-docker: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
@@ -141,78 +125,3 @@ jobs: | |
| chmod +x ./.github/push_docker.py | ||
| # GITHUB_REF##*/ is github actions magic which expands to the branch name | ||
| ./.github/push_docker.py ${{ env.DOCKER_REPO }} ${{ env.DOCKER_REPO }}:${{ env.DOCKER_TAG }} ${GITHUB_REF##*/} | ||
|
|
||
| bump-versions: | ||
| if: ${{ !startsWith(github.event.head_commit.message, 'bump:') && (!startsWith(github.actor, 'github-actions') || !startsWith(github.event.pusher.name, 'github-actions')) && (github.ref_name == 'master') && (github.event_name == 'push') }} | ||
| needs: push-docker-tag | ||
| runs-on: ubuntu-latest | ||
| name: "Bump breadbox and breadbox-client version and create changelog with commitizen" | ||
| outputs: | ||
| # Map the step outputs to job outputs | ||
| current_version: ${{ steps.current-version.outputs.current_version }} | ||
| bumped_version: ${{ steps.bumped-version.outputs.bumped_version }} | ||
| defaults: | ||
| run: | ||
| working-directory: ./breadbox | ||
| steps: | ||
| - name: Check out | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| token: "${{ secrets.GITHUB_TOKEN }}" | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v6 | ||
| with: | ||
| version: "0.7.20" | ||
|
|
||
| - name: Store current version | ||
| id: current-version | ||
| run: echo "current_version=$(uvx --from commitizen cz version -p)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Get current version | ||
| run: echo "${{ steps.current-version.outputs.current_version}}" | ||
|
|
||
| - name: config git for tagging | ||
| run: | | ||
| git config user.name github-actions | ||
| git config user.email [email protected] | ||
| git pull origin HEAD:master | ||
|
|
||
| - name: run cz bump | ||
| run: uvx --from commitizen cz --no-raise 21 bump --check-consistency | ||
|
|
||
| - name: git push tags | ||
| run: | | ||
| git push origin HEAD:master | ||
| git push origin HEAD:master --tags | ||
|
|
||
| - name: Store bumped version | ||
| id: bumped-version | ||
| run: echo "bumped_version=$(uvx --from commitizen cz version -p)" >> $GITHUB_OUTPUT | ||
| - name: Get bumped version | ||
| run: echo "${{ steps.current-version.outputs.bumped_version}}" | ||
|
|
||
| publish-breadbox-client: | ||
| needs: bump-versions | ||
| if: ${{ (needs.bump-versions.outputs.current_version != needs.bump-versions.outputs.bumped_version) && (github.ref_name == 'master') }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: "Check out" | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| token: "${{ secrets.GITHUB_TOKEN }}" | ||
| fetch-depth: 0 | ||
| # pulls latest changes from head | ||
| - run: | | ||
| git pull origin HEAD:master | ||
| - name: "Authenticate to Google Cloud" | ||
| uses: google-github-actions/auth@v2 | ||
| with: | ||
| credentials_json: "${{ secrets.DEPMAP_ARTIFACTS_SVC_ACCT }}" | ||
|
|
||
| - name: Prepare breadbox client | ||
| uses: ./.github/actions/prepare-breadbox-client # checks out and generates breadbox client code | ||
|
|
||
| - name: Publish breadbox client | ||
| uses: ./.github/actions/publish-breadbox-client | ||
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 |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| --- | ||
| name: Build breadbox client | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - "breadbox/**" | ||
| - "breadbox-client/**" | ||
| - ".github/workflows/build_breadbox_client.yaml" | ||
|
|
||
| # 2 | ||
| #permissions: | ||
| # contents: write | ||
|
|
||
| env: | ||
| DOCKER_REPO: us.gcr.io/broad-achilles/depmap-breadbox | ||
| DOCKER_TAG: ga2-build-${{ github.run_number }} | ||
|
|
||
| jobs: | ||
| build-breadbox-client: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: "Check out" | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| token: "${{ secrets.GITHUB_TOKEN }}" | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Prepare breadbox client | ||
| uses: ./.github/actions/prepare-breadbox-client # checks out and generates breadbox client code | ||
|
|
||
| - name: "Install breadbox and dependencies" | ||
| working-directory: ./breadbox | ||
| run: "poetry install" | ||
|
|
||
| - name: "Install breadbox_client and dependencies" | ||
| working-directory: ./breadbox-client | ||
| run: "poetry install" | ||
|
|
||
| - name: Running pyright | ||
| working-directory: ./breadbox-client | ||
| run: "poetry run pyright breadbox_facade" | ||
|
|
||
| - name: Running pytest | ||
| working-directory: ./breadbox-client | ||
| run: "poetry run pytest" | ||
|
|
||
| - name: Bump version and publish | ||
| working-directory: ./breadbox-client | ||
| run: "python bump_version_and_publish.py --dry-run-if-not-branch master" | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.