Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '24 14 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
37 changes: 37 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: CI/CD

on:
push:
branches: [ master, beta, feature/typed-sdk ]
pull_request:
branches: [ master, beta, feature/typed-sdk ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: CI/CD ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i
- run: npm i aws-sdk@^2
- run: npm i @aws-sdk/client-dynamodb@^3 @aws-sdk/client-s3@^3 @aws-sdk/client-secrets-manager@^3 @aws-sdk/client-sts@^3 @aws-sdk/credential-providers@^3 @aws-sdk/lib-dynamodb@^3 @aws-sdk/lib-storage@^3 @aws-sdk/node-http-handler@^3
- run: npm run compile --if-present
- run: npm run coverage-all --if-present
- uses: actions/upload-artifact@v3
with:
name: code-coverage-${{ matrix.node-version }}
path: coverage/
53 changes: 53 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: NPM Publish Package

on:
release:
types: [ published ]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm i aws-sdk@^2
- run: npm i @aws-sdk/client-cloudformation@^3 @aws-sdk/client-dynamodb@^3 @aws-sdk/client-firehose@^3 @aws-sdk/client-kinesis@^3 @aws-sdk/client-s3@^3 @aws-sdk/client-secrets-manager@^3 @aws-sdk/client-sts@^3 @aws-sdk/credential-providers@^3 @aws-sdk/lib-dynamodb@^3 @aws-sdk/lib-storage@^3 @aws-sdk/node-http-handler@^3
- run: npm run compile --if-present
- run: npm run coverage-all

- name: Extract Version from Git Tag
shell: bash
run: echo "##[set-output name=version;]$(echo ${GITHUB_REF#refs/tags/v})"
id: extract_version

- name: Remove Tag from version
shell: bash
run: echo "##[set-output name=value;]"$(echo "${{steps.extract_version.outputs.version}}" | awk -F'-' '{print $1}')
id: version

- name: Extract npm Tag from Tag Tag
shell: bash
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/v*-})"
id: extract_tag

- run: echo ref ${{github.ref}}
- run: echo version ${{steps.version.outputs.value}}
- run: echo tag ${{steps.extract_tag.outputs.tag}}

- run: npm version ${{steps.version.outputs.value}} --no-git-tag-version --allow-same-version

- if: steps.extract_tag.outputs.tag == github.ref
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- if: steps.extract_tag.outputs.tag != github.ref
run: npm publish --tag ${{steps.extract_tag.outputs.tag}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
node_modules
node_modules/*
node_modules/
*.sublime-workspace
.DS_Store
**/.DS_Store
*.swp
**/test/out/

/_cache
/.artifacts
/dist
dist
views/*
*\build.js
dist/
.vscode
/coverage
/.nyc_output
/mocha.json

*.code-workspace
.scannerwork
.idea
.idea/
*.d.ts
*.js
*.js.map
*.utest.js
21 changes: 21 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
utils
.git

# ignore the .ts files
*.ts
coverage/
docs/
test/
.vscode/
.nycrc.json
.nyc_output
.github/
*.txt
*.diff
*.patch
*.utest.js
rstreams-features.md
README-old.md

# include the .d.ts files
#!*.d.ts
29 changes: 29 additions & 0 deletions .nycrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"check-coverage": false,
"per-file": true,
"lines": 80,
"statements": 80,
"functions": 80,
"branches": 80,
"include": [],
"exclude": [
"**/*.utest.js",
"**/*.d.ts",
"coverage/*",
"test/*",
"**/.eslintrc.js",
"docs/*"
],
"reporter": [
"html",
"text",
"clover"
],
"require": [],
"extension": [
".ts",
".tsx"
],
"cache": true,
"all": false
}
Loading
Loading