Skip to content

Commit ebdf602

Browse files
authored
Exercise draft (#3)
* Refactor exercise structure and update workflows for modernizing legacy COBOL application - Removed outdated step files and replaced with new structured steps for the exercise. - Added new step files for creating a test plan and converting COBOL code to Node.js. - Updated workflows to reflect new step files and ensure proper execution order. - Enhanced README with clear objectives and prerequisites for the exercise. - Introduced COBOL source files for the legacy accounting system. - Updated .gitignore to exclude COBOL binaries and Node.js modules. * Update README.md fix default template naming * fix: enable next step workflow by removing workflow disable command * fix: update environment variable names and adjust workflow steps for consistency
1 parent 293503e commit ebdf602

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

.github/workflows/2-explain-legacy-code.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
issues: write
1414

1515
env:
16-
REVIEW_FILE: ".github/steps/3-create-test-plan.md"
16+
STEP_2_FILE: ".github/steps/3-create-test-plan.md"
1717

1818
jobs:
1919
find_exercise:
@@ -158,7 +158,7 @@ jobs:
158158
- name: Create comment - add step content
159159
run: |
160160
gh issue comment "$ISSUE_URL" \
161-
--body-file "$STEP_3_FILE"
161+
--body-file "$STEP_2_FILE"
162162
env:
163163
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
164164

.github/workflows/3-create-test-plan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
issues: write
1414

1515
env:
16-
REVIEW_FILE: ".github/steps/4-convert-the-app.md"
16+
STEP_3_FILE: ".github/steps/4-convert-the-app.md"
1717

1818
jobs:
1919
find_exercise:
@@ -103,7 +103,7 @@ jobs:
103103
with:
104104
template-file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
105105
template-vars: |
106-
next_step_number: 3
106+
next_step_number: 4
107107
108108
- name: Update comment - step finished
109109
run: |

.github/workflows/4-convert-the-app.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,34 +72,42 @@ jobs:
7272
7373
# END: Check practical exercise
7474

75-
- name: Create comment - step results
75+
- name: Fail job if not all checks passed
76+
if: contains(steps.*.outcome, 'failure')
77+
run: exit 1
78+
79+
- name: Create comment - step finished - final review next
7680
run: |
7781
gh issue comment "$ISSUE_URL" \
78-
--body "$COMMENT_BODY" \
79-
--edit-last
82+
--body-file exercise-toolkit/markdown-templates/step-feedback/lesson-review.md
8083
env:
8184
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82-
COMMENT_BODY: ${{ steps.build-message-step-results.outputs.updated-text }}
8385

84-
- name: Fail job if not all checks passed
85-
if: contains(steps.*.outcome, 'failure')
86-
run: exit 1
86+
post_review_content:
87+
name: Post review content
88+
needs: [find_exercise, check_step_work]
89+
runs-on: ubuntu-latest
90+
env:
91+
ISSUE_URL: ${{ needs.find_exercise.outputs.issue-url }}
8792

88-
- name: Build message - step finished
89-
id: build-message-step-finish
90-
uses: skills/action-text-variables@v2
93+
steps:
94+
- name: Checkout
95+
uses: actions/checkout@v4
96+
97+
98+
- name: Get response templates
99+
uses: actions/checkout@v4
91100
with:
92-
template-file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
93-
template-vars: |
94-
next_step_number: 3
101+
repository: skills/exercise-toolkit
102+
path: exercise-toolkit
103+
ref: v0.6.0
95104

96-
- name: Update comment - step finished
105+
- name: Create comment - add step content
97106
run: |
98107
gh issue comment "$ISSUE_URL" \
99-
--body "$ISSUE_BODY"
108+
--body-file "$REVIEW_FILE"
100109
env:
101110
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102-
ISSUE_BODY: ${{ steps.build-message-step-finish.outputs.updated-text }}
103111

104112
finish_exercise:
105113
name: Finish Exercise

0 commit comments

Comments
 (0)