Skip to content

Bump @types/node from 20.11.17 to 20.11.30 #355

Bump @types/node from 20.11.17 to 20.11.30

Bump @types/node from 20.11.17 to 20.11.30 #355

Workflow file for this run

name: 'Build & Test Action'
on:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build-action: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Cache npm packages
uses: actions/cache@v4
with:
path: 'node_modules'
key: npm-v2-${{ hashFiles('package-lock.json') }}
- name: Install npm packages
run: npm install --frozen-lockfile
- name: Build, Format, Lint, Package, and Test
run: npm run all
test-action: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Cache npm packages
uses: actions/cache@v4
with:
path: 'node_modules'
key: npm-v2-${{ hashFiles('package-lock.json') }}
- name: Install npm packages
run: npm install --frozen-lockfile
- name: Build & Package
run: npm run build && npm run package
- name: Test built package
uses: ./
id: action-test
with:
base-branch: 'test_changes'
command: "echo \\\"$(cat ./__tests__/{branchName}.txt | grep {globs})\\\""
glob-template: "-e '{glob}'"
change-map: |
text-and-png: {"globs": [".txt", ".png"]}
text: {"globs": ".txt"}
text-separate: {"globs": ".txt", "separateDeleted": true}
missing: {"globs": ".jpg"}
- name: Print Test Outputs
run: |
echo "Result => any-matches: ${{ steps.action-test.outputs.any-matches }}"
echo "Result => text-and-png: ${{ steps.action-test.outputs.text-and-png }}"
echo "Result => any-text-and-png: ${{ steps.action-test.outputs.any-text-and-png }}"
echo "Result => text: ${{ steps.action-test.outputs.text }}"
echo "Result => any-text: ${{ steps.action-test.outputs.any-text }}"
echo "Result => text-separate: ${{ steps.action-test.outputs.text-separate }}"
echo "Result => any-text-separate: ${{ steps.action-test.outputs.any-text-separate }}"
echo "Result => deleted-text-separate: ${{ steps.action-test.outputs.deleted-text-separate }}"
echo "Result => missing: ${{ steps.action-test.outputs.missing }}"
echo "Result => any-missing: ${{ steps.action-test.outputs.any-missing }}"
- name: Fail If Test Outputs Incorrectly
if: >-
steps.action-test.outputs.any-matches != 'true' ||
steps.action-test.outputs.text-and-png != 'added_text.txt added_img.png changed_text.txt changed_img.png deleted_text.txt' ||
steps.action-test.outputs.any-text-and-png != 'true' ||
steps.action-test.outputs.text != 'added_text.txt changed_text.txt deleted_text.txt' ||
steps.action-test.outputs.any-text != 'true' ||
steps.action-test.outputs.text-separate != 'added_text.txt changed_text.txt' ||
steps.action-test.outputs.any-text-separate != 'true' ||
steps.action-test.outputs.deleted-text-separate != 'deleted_text.txt' ||
steps.action-test.outputs.missing != '' ||
steps.action-test.outputs.any-missing != 'false'
run: exit 1