Skip to content

Merge pull request #149 from brickhouse-tech/test/dynamic_filename_in… #328

Merge pull request #149 from brickhouse-tech/test/dynamic_filename_in…

Merge pull request #149 from brickhouse-tech/test/dynamic_filename_in… #328

Workflow file for this run

name: tests
on:
workflow_call:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
test:
strategy:
matrix:
node-version: ['20.x', '22.x', '24.x']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# cache: "npm" # needs lockfile if enabled
- run: npm install
- run: npm run lint
- run: npm test
# Note: S3 tests (test/s3.test.ts) are skipped when AWS credentials are not available
shell-test:
name: Executable YAML Shell Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '22.x'
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build
- name: Run CI executable wrapper test
run: bash ./scripts/test-ci.sh
tests:
name: tests
needs: [test, shell-test]
runs-on: ubuntu-latest
if: always()
steps:
- name: Check test results
run: |
results=($(echo '${{ toJSON(needs.*.result) }}' | jq -r '.[]'))
for r in "${results[@]}"; do
if [[ "$r" != "success" ]]; then
echo "One or more jobs failed: $r"
exit 1
fi
done
echo "All jobs passed"