Files
gh-action-readme/testdata/composite-action/action.yml
Ismo Vuorinen b80ecfce92 chore: even more linting, test fixes (#24)
* chore(lint): funcorder

* chore(lint): yamlfmt, ignored broken test yaml files

* chore(tests): tests do not output garbage, add coverage

* chore(lint): fix editorconfig violations

* chore(lint): move from eclint to editorconfig-checker

* chore(lint): add pre-commit, run and fix

* chore(ci): we use renovate to manage updates
2025-08-06 23:44:32 +03:00

55 lines
1.3 KiB
YAML

---
name: Composite Example Action
description: 'Test Composite Action for gh-action-readme dependency analysis'
inputs:
node-version:
description: Node.js version to use
required: false
default: '20'
working-directory:
description: Working directory
required: false
default: '.'
outputs:
build-result:
description: Build result status
value: ${{ steps.build.outputs.result }}
runs:
using: composite
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
token: ${{ github.token }}
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ inputs.node-version }}
cache: 'npm'
- name: Install dependencies
shell: bash
run: |
cd ${{ inputs.working-directory }}
npm ci
- name: Run tests
shell: bash
run: |
npm test
echo "Tests completed successfully"
env:
NODE_ENV: test
- name: Build project
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
id: build
with:
node-version: ${{ inputs.node-version }}
branding:
icon: package
color: blue