serverless-api-gateway-caching
Version:
A plugin for the serverless framework which helps with configuring caching for API Gateway endpoints.
69 lines (60 loc) • 1.49 kB
YAML
version: 2
references:
container_config:
docker:
- image: cimg/node:22.1.0
poke_npmrc:
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
restore_npm_cache:
restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
save_npm_cache:
save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
create_test_results_dir:
run:
command: |
mkdir test-results
mkdir test-results/mocha
store_test_results:
store_test_results:
path: test-results
jobs:
dev:
<<:
steps:
-
- checkout
-
- run: npm install
-
-
- run:
environment:
MOCHA_FILE: ./test-results/mocha/results.xml
command: npm run test -- --reporter mocha-junit-reporter
-
live:
<<:
steps:
-
- checkout
-
- run: npm install
-
- run: npm publish
workflows:
version: 2
build:
jobs:
- dev
- live:
requires:
- dev
filters:
branches:
only: master