Skip to content

docs: add guide for CI/CD template testing #15528

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 8 commits into from
Nov 20, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update template testing workflow to ensure cleanup
  • Loading branch information
matifali committed Nov 19, 2024
commit d82b10cbb18851801f9058b7a77f873184395bd6
9 changes: 5 additions & 4 deletions docs/tutorials/testing-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,17 @@ jobs:
run: |
coder templates push $TEMPLATE_NAME --activate=false --name ${{ steps.name.outputs.version_name }} --message "${{ steps.message.outputs.pr_title }}" --yes

- name: Create a test workspace
- name: Create a test workspace and run some example commands
run: |
coder create -t $TEMPLATE_NAME --template-version ${{ steps.name.outputs.version_name }} test-${{ steps.name.outputs.version_name }} --yes

- name: Run some example commands
run: |
coder config-ssh --yes
# run some example commands
coder ssh test-${{ steps.name.outputs.version_name }} -- make build

- name: Delete the test workspace
if: always()
run: coder delete test-${{ steps.name.outputs.version_name }} --yes

- name: Promote template version
if: success()
run: |
Expand Down
Loading