Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/check-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ jobs:
check-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "16"
node-version: "24"
- run: npm install
- run: npm run build
- run: git diff --exit-code
63 changes: 63 additions & 0 deletions .github/workflows/smoke-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Smoke test

on:
push:
pull_request:
workflow_dispatch:

jobs:
smoke-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-python@v6
with:
python-version: "3.x"

- name: Run basic script
id: basic
uses: ./
with:
util: false
script: |
print("smoke-ok")

- name: Verify basic script outputs
run: |
test "${{ steps.basic.outputs.error }}" = "false"
test "${{ steps.basic.outputs.stderr }}" = ""
grep -F "smoke-ok" <<< '${{ steps.basic.outputs.stdout }}'

- name: Run script with utility functions
id: utility
uses: ./
with:
util: true
script: |
set_output("utility_result", "utility-ok")
print("utility-stdout")

- name: Verify utility script outputs
run: |
test "${{ steps.utility.outputs.error }}" = "false"
grep -F "utility-ok" <<< '${{ steps.utility.outputs.utility_result }}'
grep -F "utility-stdout" <<< '${{ steps.utility.outputs.stdout }}'

- name: Run non-fatal failing script
id: failure
uses: ./
with:
fail-on-error: false
util: false
script: |
import sys
print("failure-stdout")
print("failure-stderr", file=sys.stderr)
sys.exit(7)

- name: Verify non-fatal failure outputs
run: |
test "${{ steps.failure.outputs.error }}" = "true"
grep -F "failure-stdout" <<< '${{ steps.failure.outputs.stdout }}'
grep -F "failure-stderr" <<< '${{ steps.failure.outputs.stderr }}'
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ outputs:
error:
description: "A string of 'true' or 'false' that tells if there were errors, use in conjunction with the fail-on-error input"
runs:
using: "node20"
main: "dist/index.js"
using: "node24"
main: "dist/index.mjs"
branding:
color: "purple"
icon: "play"
Loading