Skip to content
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

Refactoring/improve comments and readme #15

Merged
merged 4 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/lint-format-typecheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/${{ secrets.GH_DOCKER_REGISTRY_NAMESPACE }}/${{ vars.CONTAINER_IMAGE_NAME }}
# Push new container image if `eventFilterForPush` and `refFilterForPush` (by default allow all branches to trigger a push of the container image) are true
push: filter
# Push new image only if event name that triggered this workflow matches `push`
# If a pull request triggered it, then skip pushing new container image to registry
eventFilterForPush: push
runCmd: |
poetry run ruff check --fix
poetry run ruff format .
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ jobs:
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/${{ secrets.GH_DOCKER_REGISTRY_NAMESPACE }}/${{ vars.CONTAINER_IMAGE_NAME }}
push: filter
eventFilterForPush: push
runCmd: |
poetry run pytest
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ Note that in step 3, the devcontainer is not rebuilt, but reused from the latest

### 2. Open a PR with a new feature

Similar to scenario 1, but pushing new devcontainer image is _skipped_ because the code changes are not merged to main ([see specification of](https://github.com/devcontainers/ci/blob/main/docs/github-action.md#inputs) `push` and `eventFilterForPush` inputs for `devcontainer/ci` action).
Similar to scenario 1, but pushing new devcontainer image is _skipped_ because the workflow has not been triggered by a push to main, rather a PR event (for more [see specification of](https://github.com/devcontainers/ci/blob/main/docs/github-action.md#inputs) `push`, `refFilterForPush`, and `eventFilterForPush` (default) inputs for `devcontainer/ci` action).

### 3. Add new Python libraries to the list of existing dependencies

If we were to add a new Python library as part of our development, in step 4 of scenario 1 we would not get the virtual environment from the cache, but we would use the newly created one with the additional library and _push_ it to the cache.
If we were to add a new Python library as part of our development, in step 4 of scenario 1 we would not get the virtual environment from the cache, but we would use the newly created one with the additional library and _push_ it to the cache.