Enable setting AWS API Gateway integration timeout #61
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PR's only | |
name: Validate | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
env: | |
SLS_IGNORE_WARNING: '*' | |
FORCE_COLOR: 1 | |
SLS_SCHEMA_CACHE_BASE_DIR: '/home/runner' | |
jobs: | |
linuxNode22: | |
name: '[Linux] Node 22: Lint, Formatting, Changelog, Unit & packaging tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 30 | |
- name: Retrieve last main commit (for `git diff` purposes) | |
run: | | |
git checkout -b pr | |
git fetch --prune --depth=30 origin +refs/heads/main:refs/remotes/origin/main | |
git checkout main | |
git checkout pr | |
- name: Retrieve dependencies from cache | |
id: cacheNpm | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
node_modules | |
key: npm-v22-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | |
restore-keys: | | |
npm-v22-${{ runner.os }}-${{ github.ref }}- | |
npm-v22-${{ runner.os }}-refs/heads/main- | |
- name: Install Node.js and npm | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- name: Install dependencies | |
if: steps.cacheNpm.outputs.cache-hit != 'true' | |
run: | | |
npm update --no-save | |
npm update --save-dev --no-save | |
- name: Validate formatting | |
run: npm run prettier-check:updated | |
- name: Validate lint rules | |
run: npm run lint:updated | |
- name: Validate changelog (if new version) | |
run: | | |
NEW_VERSION=`git diff -U0 main package.json | grep '"version": "' | tail -n 1 | grep -oE "[0-9]+\.[0-9]+\.[0-9]+"` || : | |
if [ -n "$NEW_VERSION" ]; | |
then | |
npx dump-release-notes-from-cc-changelog $NEW_VERSION | |
fi | |
- name: Unit tests | |
# Some tests depend on TTY support, which is missing in GA runner | |
# Workaround taken from https://github.com/actions/runner/issues/241#issuecomment-577360161 | |
run: script -e -c "npm test -- -b" | |
- name: Packaging tests | |
run: npm run integration-test-run-package | |
windowsNode16: | |
name: '[Windows] Node 16: Unit tests' | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Retrieve dependencies from cache | |
id: cacheNpm | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
node_modules | |
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | |
restore-keys: | | |
npm-v16-${{ runner.os }}-${{ github.ref }}- | |
npm-v16-${{ runner.os }}-refs/heads/main- | |
- name: Install Node.js and npm | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: Install dependencies | |
if: steps.cacheNpm.outputs.cache-hit != 'true' | |
run: | | |
npm update --no-save | |
npm update --save-dev --no-save | |
- name: Unit tests | |
run: npm test -- -b | |
linuxNode16: | |
name: '[Linux] Node 16: Isolated unit tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Retrieve dependencies from cache | |
id: cacheNpm | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
node_modules | |
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | |
restore-keys: | | |
npm-v16-${{ runner.os }}-${{ github.ref }}- | |
npm-v16-${{ runner.os }}-refs/heads/main- | |
- name: Install Node.js and npm | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: Install dependencies | |
if: steps.cacheNpm.outputs.cache-hit != 'true' | |
run: | | |
npm update --no-save | |
npm update --save-dev --no-save | |
- name: Unit tests | |
# Some tests depend on TTY support, which is missing in GA runner | |
# Workaround taken from https://github.com/actions/runner/issues/241#issuecomment-577360161 | |
run: script -e -c "npm run test:isolated -- -b" |