-
Notifications
You must be signed in to change notification settings - Fork 435
ci: centralize dev-env image version + bump to v1.2.0 #1448
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 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5fb4c88
ci: centralize dev-env image version via reusable workflow (PoC on he…
marc0olo 2e601db
Merge remote-tracking branch 'origin/master' into chore/centralize-de…
marc0olo f683bb5
ci: sweep all example workflows to the reusable _run-example.yml pattern
marc0olo 4588cdc
Merge remote-tracking branch 'origin/master' into chore/centralize-de…
marc0olo 315dbbb
ci: address review feedback on the dev-env centralization
marc0olo 4d7bb48
ci: bump dev-env image to v1.2.0
marc0olo 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
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 |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # Reusable workflow that runs an example's CI steps inside the ICP dev-env container. | ||
| # | ||
| # This is the single source of truth for the dev-env image version used in CI. | ||
| # It is kept in sync with .devcontainer/devcontainer.json by dev-env-version-check.yml. | ||
| # | ||
| # Callers provide the language (which selects the image variant), the working | ||
| # directory, and the commands to run. Example: | ||
| # | ||
| # jobs: | ||
| # motoko-hello_world: | ||
| # uses: ./.github/workflows/_run-example.yml | ||
| # with: | ||
| # language: motoko | ||
| # working-directory: motoko/hello_world | ||
| # run: | | ||
| # icp network start -d | ||
| # icp deploy | ||
| # bash test.sh | ||
| # | ||
| # Examples that need a PocketIC server for integration tests set | ||
| # install-pocketic: true (optionally overriding pocketic-version). | ||
| name: run-example | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| language: | ||
| description: "Dev-env image variant to run in: motoko | rust | all" | ||
| type: string | ||
| required: true | ||
| working-directory: | ||
| description: "Path to the example directory to run the commands in" | ||
| type: string | ||
| required: true | ||
| run: | ||
| description: "Commands to execute inside the dev-env container" | ||
| type: string | ||
| default: | | ||
| icp network start -d | ||
| icp deploy | ||
| install-pocketic: | ||
| description: "Install the PocketIC server before running the commands" | ||
| type: boolean | ||
| default: false | ||
| pocketic-version: | ||
| description: "PocketIC server version to install when install-pocketic is true" | ||
| type: string | ||
| default: "15.0.0" | ||
|
|
||
| jobs: | ||
| run: | ||
| runs-on: ubuntu-24.04 | ||
| container: ghcr.io/dfinity/icp-dev-env-${{ inputs.language }}:1.1.0 | ||
| env: | ||
| ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
| - name: Install PocketIC server | ||
| if: ${{ inputs.install-pocketic }} | ||
| uses: dfinity/pocketic@a980c334fab1b21b0b8a6bba38e1a10836e7258b # main | ||
| with: | ||
| pocket-ic-server-version: ${{ inputs.pocketic-version }} | ||
| - name: Run | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: ${{ inputs.run }} |
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
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
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
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.