Skip to content

Bump actions/checkout from 4 to 5 #46

Bump actions/checkout from 4 to 5

Bump actions/checkout from 4 to 5 #46

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
pull-requests: write
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Validate action.yml Metadata
run: |
yq eval '.' action.yml > /dev/null
- name: Test Case 1 - Composite Action - Success Path with Defaults
uses: ./
id: test-success-path-defaults
with:
label: "test-success-path-defaults"
script: |
console.log("✅ github-script-post-comment action executed in CI.");
return "Self-test successful.";
- name: Upload Embedded JavaScript
uses: actions/upload-artifact@v4
if: always()
with:
name: embedded-js
path: 'final_script.js'
- name: Lint Embedded JavaScript and project files
env:
NODE_ENV: development
run: |
npm ci
npx eslint .
- name: Test Case 2 - Composite Action - No Return
uses: ./
id: test-no-return
continue-on-error: true
with:
label: "test-no-return"
script: |
console.log("Expect error: script does not return string.");
- name: Test Case 3 - Composite Action - Return Non-String
uses: ./
id: test-return-non-string
continue-on-error: true
with:
label: "test-return-non-string"
script: |
console.log("Expect error: script returns non-string.");
return {title: "Test Case 3", message: "test case return non-string", score: 50};
- name: Test Case 4 - Composite Action - Success Path with github-step-summary
uses: ./
id: test-success-path-github-step-summary
with:
label: "test-success-path-github-step-summary"
post-target: github-step-summary
script: |
console.log("✅ github-script-post-comment action executed in CI.");
return "Self-test successful.";
- name: Test Case 5 - Composite Action - Success Path with pull-request
uses: ./
id: test-success-path-pull-request
with:
label: "test-success-path-pull-request"
post-target: pull-request
script: |
console.log("✅ github-script-post-comment action executed in CI.");
return "Self-test successful.";