Files
aws-doc-sdk-examples/.github/workflows/lint-javascript.yml
Corey Pyle 278cfef0e1 JavaScript (v3): Textract - Fix non-unique domain prefix in textract-react CFN template and some broke unit tests. (#7190)
* JavaScript (v3): Textract - Fix non-unique domain prefix in textract-react CFN template.
* JavaScript (v3): Textract - Update to latest react scripts and declare working node engine.
* JavaScript (v3): Add workaround for broken instanceof check 
[This PR](https://github.com/smithy-lang/smithy-typescript/pull/1490/files) overrode
the default 'instanceof' implementation for ServiceException. It created a duck-type
check that took priority over the prototype chain check. There's a [fix](https://github.com/smithy-lang/smithy-typescript/pull/1503/files)
incoming, but in the meantime this makes it quack.
* JavaScript (v3): Textract - Ensure unique LoginUrl is saved as a CFN output.
* JavaScript (v3): Unit tests - Fix incorrect link in S3 unit tests comments.
2025-01-14 11:51:22 -08:00

44 lines
1.4 KiB
YAML

name: JavaScript
on: # yamllint disable-line rule:truthy
pull_request:
workflow_dispatch:
jobs:
lint:
name: Lint Javascript
runs-on: ubuntu-latest
steps:
- name: Checkout files
uses: actions/checkout@v4
with:
sparse-checkout: |
.github
javascriptv3
workflows
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@e9772d140489982e0e3704fea5ee93d536f1e275
with:
files: "javascriptv3/**/*.{js,ts,jsx,tsx,json}"
- name: Setup NodeJS
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: "22.x"
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: npm i --prefix javascriptv3
- name: Validate package names
if: steps.changed-files.outputs.any_changed == 'true'
run: ./javascriptv3/github_scripts/validate_packages.sh
- name: Lint added and modified files
if: steps.changed-files.outputs.any_changed == 'true'
run: |
changed_files=(${{steps.changed-files.outputs.all_changed_files}})
./javascriptv3/github_scripts/lint.sh "${changed_files[@]}"
- name: Run unit tests
if: steps.changed-files.outputs.any_changed == 'true'
run: npm test --prefix javascriptv3