Skip to content

test(cicd): Fix/release #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 67 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
fa820ca
build(deps-dev): bump @types/jest from 27.0.2 to 27.0.3 (#258)
dependabot[bot] Dec 2, 2021
0a83904
docs: base documentation (#250)
dreamorosi Dec 6, 2021
63e90c7
chore(cicd): fix slack notif
Dec 6, 2021
9e4be32
chore(cicd): publish to npm
Dec 6, 2021
c8432d1
v0.1.0-beta.0
flochaz Dec 6, 2021
fd42b59
chore(metrics): commit to publish
Dec 6, 2021
c2ccd90
Merge branch 'chore/releaseFlow' of github.com:flochaz/aws-lambda-pow…
Dec 6, 2021
3eb4512
v0.1.0-beta.1
flochaz Dec 6, 2021
c30cafc
chore(metrics): commit to publish beta.2
Dec 6, 2021
317f61b
v0.1.0-beta.2
flochaz Dec 6, 2021
48f6c29
chore(cicd): commit to publish beta.3
Dec 6, 2021
208fbf8
Merge branch 'chore/releaseFlow' of github.com:flochaz/aws-lambda-pow…
Dec 6, 2021
0f9e848
v0.1.0-beta.3
flochaz Dec 6, 2021
fb6a17c
chore(cicd): commit to publish beta.4
Dec 6, 2021
bf024c9
Merge branch 'chore/releaseFlow' of github.com:flochaz/aws-lambda-pow…
Dec 6, 2021
2c5b3ac
v0.1.0-beta.4
flochaz Dec 6, 2021
82a16b2
chore(cicd): commit to publish beta.5
Dec 6, 2021
1fa8cec
Merge branch 'chore/releaseFlow' of github.com:flochaz/aws-lambda-pow…
Dec 6, 2021
22ae81c
v0.1.0-beta.5
flochaz Dec 6, 2021
c9e9af2
chore(cicd): scope to flochaz
Dec 6, 2021
7d83928
Merge branch 'chore/releaseFlow' of github.com:flochaz/aws-lambda-pow…
Dec 6, 2021
31155fa
v0.1.0-beta.6
flochaz Dec 6, 2021
1735c73
build(deps): bump romeovs/lcov-reporter-action from 0.2.21 to 0.3.1 (…
dependabot[bot] Dec 7, 2021
4533693
build(deps): bump @types/aws-lambda from 8.10.85 to 8.10.86 (#263)
dependabot[bot] Dec 7, 2021
04a13d9
build(deps-dev): bump ts-jest from 27.0.7 to 27.1.0 (#264)
dependabot[bot] Dec 7, 2021
e723765
build(deps-dev): bump @typescript-eslint/eslint-plugin (#265)
dependabot[bot] Dec 7, 2021
4e707c1
build(deps-dev): bump eslint from 8.3.0 to 8.4.1 (#266)
dependabot[bot] Dec 7, 2021
41a6eb3
build(deps-dev): bump @types/node from 16.11.11 to 16.11.12 (#267)
dependabot[bot] Dec 7, 2021
aa7e77a
feat: Auto publish docs to version "develop" (#269)
ijemmy Dec 8, 2021
9ebcbb3
build(deps-dev): bump @typescript-eslint/parser from 5.5.0 to 5.6.0 (…
dependabot[bot] Dec 8, 2021
2504e0e
build(deps-dev): bump @typescript-eslint/eslint-plugin (#273)
dependabot[bot] Dec 8, 2021
f329cdf
build(deps-dev): bump @types/node from 16.11.11 to 16.11.12 (#270)
dependabot[bot] Dec 8, 2021
eb90dd7
build(deps-dev): bump ts-jest from 27.0.7 to 27.1.1 (#271)
dependabot[bot] Dec 8, 2021
a73e807
build(deps): bump @types/aws-lambda from 8.10.85 to 8.10.86 (#272)
dependabot[bot] Dec 8, 2021
5e63a86
build(deps-dev): bump @types/lodash from 4.14.177 to 4.14.178 (#283)
dependabot[bot] Dec 9, 2021
da659d4
build(deps-dev): bump jest from 27.4.3 to 27.4.4 (#288)
dependabot[bot] Dec 10, 2021
92a59f1
build(deps-dev): bump typescript from 4.5.2 to 4.5.3 (#287)
dependabot[bot] Dec 10, 2021
64591f6
chore(docs): generate api docs (#277)
ijemmy Dec 12, 2021
2561ede
chore(metrics): github page doc (#284)
flochaz Dec 12, 2021
8d40471
feat(metric): bring feature parity between decorator and utility func…
flochaz Dec 13, 2021
e043c62
build(deps-dev): bump ts-jest from 27.0.7 to 27.1.1 (#296)
dependabot[bot] Dec 13, 2021
a10ca26
build(deps-dev): bump @typescript-eslint/parser from 5.5.0 to 5.6.0 (…
dependabot[bot] Dec 13, 2021
0e292e2
build(deps-dev): bump jest from 27.4.3 to 27.4.4 (#300)
dependabot[bot] Dec 13, 2021
ebdcc4e
build(deps): bump @types/aws-lambda from 8.10.85 to 8.10.87 (#299)
dependabot[bot] Dec 13, 2021
3af9900
build(deps-dev): bump @typescript-eslint/eslint-plugin (#297)
dependabot[bot] Dec 13, 2021
87cf8e6
feat(logger): edit mkdocs, small updates to logic and test for featur…
saragerion Dec 13, 2021
064c2e2
chore(metrics): Add typeDoc (#285)
flochaz Dec 14, 2021
f92279f
feat: add tracer (#107)
dreamorosi Dec 14, 2021
1558510
build(deps): bump aws-xray-sdk-core from 3.3.3 to 3.3.4 (#307)
dependabot[bot] Dec 14, 2021
3bf99d5
build(deps-dev): bump @typescript-eslint/eslint-plugin (#309)
dependabot[bot] Dec 14, 2021
86749dd
build(deps-dev): bump @typescript-eslint/parser from 5.5.0 to 5.7.0 (…
dependabot[bot] Dec 14, 2021
21be92d
build(deps-dev): bump typescript from 4.5.2 to 4.5.4 (#311)
dependabot[bot] Dec 14, 2021
a4c71f6
build(deps): bump @types/aws-lambda from 8.10.85 to 8.10.88 (#312)
dependabot[bot] Dec 14, 2021
00696e7
build(deps-dev): bump jest from 27.4.3 to 27.4.5 (#310)
dependabot[bot] Dec 15, 2021
5456231
Fixes #303 (#305)
dreamorosi Dec 15, 2021
9ed1313
fix linting
flochaz Dec 15, 2021
a0e58d6
fix npm access
flochaz Dec 15, 2021
14e7eb4
fix lint
flochaz Dec 15, 2021
a0177a7
chore(metrics): fix packaging by using shared commons module
flochaz Dec 15, 2021
8a37a94
chore(metrics): fix packaging by using shared commons module
flochaz Dec 15, 2021
a0b9c6d
chore(docs): Tracer docs (#274)
dreamorosi Dec 15, 2021
8306fca
Merge remote-tracking branch 'origin/main' into fix/packaging
flochaz Dec 15, 2021
3ad2470
chore(tracing): fix packaging
flochaz Dec 15, 2021
8aab843
Merge branch 'chore/releaseFlow' into fix/release
flochaz Dec 15, 2021
bbaca84
fix github flow
flochaz Dec 15, 2021
09f8678
remove pr and keep push only
flochaz Dec 15, 2021
18abd62
Merge branch 'chore/releaseFlow' into fix/release
flochaz Dec 15, 2021
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
104 changes: 59 additions & 45 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,63 +1,77 @@
module.exports = {
env: {
'browser': false,
'es2020': true,
'jest': true,
'node': true,
browser: false,
es2020: true,
jest: true,
node: true,
},
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
settings: {
'import/resolver': {
node: {},
typescript: {
project: './tsconfig.es.json',
alwaysTryTypes: true,
},
},
},
rules: {
'@typescript-eslint/ban-ts-ignore': ['off'],
'@typescript-eslint/camelcase': ['off'],
'@typescript-eslint/explicit-function-return-type': [ 'error', { 'allowExpressions': true } ],
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/indent': [ 'error', 2, { 'SwitchCase': 1 } ],
'@typescript-eslint/indent': ['error', 2, { SwitchCase: 1 }],
'@typescript-eslint/interface-name-prefix': ['off'],
'@typescript-eslint/member-delimiter-style': [ 'error', { 'multiline': { 'delimiter': 'none' } } ],
'@typescript-eslint/member-ordering': [ 'error', {
'default': { 'memberTypes': [
'signature',
'public-field', // = ["public-static-field", "public-instance-field"]
'protected-field', // = ["protected-static-field", "protected-instance-field"]
'private-field', // = ["private-static-field", "private-instance-field"]
'constructor',
'public-method', // = ["public-static-method", "public-instance-method"]
'protected-method', // = ["protected-static-method", "protected-instance-method"]
'private-method' // = ["private-static-method", "private-instance-method"]
] ,
'order': 'alphabetically' }
} ],
'@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'none' } }],
'@typescript-eslint/member-ordering': [
'error',
{
default: {
memberTypes: [
'signature',
'public-field', // = ["public-static-field", "public-instance-field"]
'protected-field', // = ["protected-static-field", "protected-instance-field"]
'private-field', // = ["private-static-field", "private-instance-field"]
'constructor',
'public-method', // = ["public-static-method", "public-instance-method"]
'protected-method', // = ["protected-static-method", "protected-instance-method"]
'private-method', // = ["private-static-method", "private-instance-method"]
],
order: 'alphabetically',
},
},
],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-inferrable-types': ['off'],
'@typescript-eslint/no-unused-vars': [ 'error', { 'argsIgnorePattern': '^_' } ],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-use-before-define': ['off'],
'@typescript-eslint/semi': [ 'error', 'always' ],
'array-bracket-spacing': [ 'error', 'always', { 'singleValue': false } ],
'arrow-body-style': [ 'error', 'as-needed' ],
'computed-property-spacing': [ 'error', 'never' ],
'func-style': [ 'warn', 'expression' ],
'indent': [ 'error', 2, { 'SwitchCase': 1 } ],
'@typescript-eslint/semi': ['error', 'always'],
'array-bracket-spacing': ['error', 'always', { singleValue: false }],
'arrow-body-style': ['error', 'as-needed'],
'computed-property-spacing': ['error', 'never'],
'func-style': ['warn', 'expression'],
indent: ['error', 2, { SwitchCase: 1 }],
'keyword-spacing': 'error',
'newline-before-return': 2,
'no-console': 0,
'no-multi-spaces': [ 'error', { 'ignoreEOLComments': false } ],
'no-multiple-empty-lines': [ 'error', { 'max': 1, 'maxBOF': 0 } ],
'no-multi-spaces': ['error', { ignoreEOLComments: false }],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0 }],
'no-throw-literal': 'error',
'object-curly-spacing': [ 'error', 'always' ],
'object-curly-spacing': ['error', 'always'],
'prefer-arrow-callback': 'error',
'quotes': [ 'error', 'single', { 'allowTemplateLiterals': true } ],
'semi': [ 'error', 'always' ],
'sort-imports': [ 'error', {
'allowSeparatedGroups': true,
'ignoreCase': true,
'ignoreDeclarationSort': false,
'ignoreMemberSort': true,
'memberSyntaxSortOrder': [ 'all', 'single', 'multiple', 'none' ]
} ]
}
};
quotes: ['error', 'single', { allowTemplateLiterals: true }],
semi: ['error', 'always'],
'sort-imports': [
'error',
{
allowSeparatedGroups: true,
ignoreCase: true,
ignoreDeclarationSort: false,
ignoreMemberSort: true,
memberSyntaxSortOrder: ['all', 'single', 'multiple', 'none'],
},
],
},
};
55 changes: 55 additions & 0 deletions .github/workflows/on-docs-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Auto publish docs to version "develop"

on:
push:
branches:
- main
paths:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- 'mkdocs.yml'
- '.github/workflows/on-docs-change.yml'

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2.3.1
with:
python-version: '3.8'
- name: Set up NodeJS
uses: actions/setup-node@v2
with:
node-version: '17.2'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install mike==1.1.2 mkdocs-material==8.0.5 mkdocs-git-revision-date-plugin==0.3.1
npm ci
- name: Setup doc deploy
run: |
git config --global user.name Docs deploy
git config --global user.email docs@dummy.bot.com
- name: Build mkdocs site in 'gh-pages' branch and push
run: |
rm -rf site
VERSION="develop"
ALIAS="stage"
mkdocs build
mike deploy --push --update-aliases "$VERSION" "$ALIAS"
- name: Build API documentation site
run: |
rm -rf api
npm run docs-generateApiDoc
- name: Deploy API documentation site (copy to "gh-pages" branch inside the version folder)
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./api
keep_files: true
destination_dir: develop/api
43 changes: 0 additions & 43 deletions .github/workflows/on-pull-request.yml

This file was deleted.

26 changes: 24 additions & 2 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
jobs:
on_push:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
env:
NODE_ENV: dev
steps:
Expand All @@ -14,11 +13,34 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '14'
- name: "Setup npm"
run: |
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
- name: Install packages
run: |
npm ci
npm run lerna-ci
- name: Run lint
run: npm run lerna-lint
- name: Run tests
run: npm run lerna-test
run: npm run lerna-test
- name: Collate Coverage Reports
if: ${{ github.actor != 'dependabot[bot]' }}
run: |
for d in ./packages/*/ ; do
mkdir -p coverage
if [[ ! -f coverage/lcov.info ]]
then
continue
fi
filename="$d""coverage/lcov.info"
targetSource="SF:""$d""src"
sed "s|SF:src|$targetSource|g" $filename >> coverage/lcov.info
done
- name: Report Coverage
#Dependabot user will only have read-only perms, so don't try to report coverage
if: ${{ github.actor != 'dependabot[bot]' }}
uses: romeovs/lcov-reporter-action@v0.3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-file: ./coverage/lcov.info
19 changes: 1 addition & 18 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: release
on:
push:
branches:
- main
- chore/releaseFlow
workflow_dispatch: {}
jobs:
publish:
Expand Down Expand Up @@ -43,20 +43,3 @@ jobs:
fi

npx lerna publish --no-verify-access from-git --yes

slack:
name: Publish to slack channel
needs:
- publish
runs-on: ubuntu-latest
steps:
- name: publish latest release
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
run: |
curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/${{ github.repository }}/releases/latest > release.json
VERSION=$( jq -r '.name' release.json )
CONTENT=$( jq -r '.body' release.json )
jq -n --arg version "$VERSION" --arg content "$CONTENT" '{"release-version": $version, "release-content": $content}' > body.json
curl --location --request POST $SLACK_WEBHOOK_URL \
--header 'Content-Type: application/json' --data @body.json
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@ coverage
.DS_Store

# Visual Studio Code
.vscode
.vscode

# Python virtual environments (for running mkdocs locally)
venv

# Static documentation site generated by Mkdocs
site

# Generated API documentation (from TypeDoc)
/api
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Changelog

All notable changes to this project will be documented in this file.

This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format for changes and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [Unreleased]

## 0.1.0

### Features

* **tracer:** beta release ([#91](https://github.com/awslabs/aws-lambda-powertools-python/issues/91))
* **logger:** beta release ([#24](https://github.com/awslabs/aws-lambda-powertools-python/issues/24))
* **metrics:** beta release ([#25](https://github.com/awslabs/aws-lambda-powertools-python/issues/25))
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ To send us a pull request, please follow these steps:
GitHub provides an additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).

#### Local documentation

You might find useful to run both the documentation website and the API reference locally while contributing:

* **API reference**: :construction:
* **Docs website**:

You can build and start a local docs website by running these two commands.
- `npm run docs-buildDockerImage` OR `docker build -t squidfunk/mkdocs-material ./docs/`
- `npm run docs-runLocalDocker` OR `docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material`

### Conventions

Category | Convention
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AWS Lambda Powertools (Typescript)
# AWS Lambda Powertools (TypeScript)
![Tests](https://github.com/awslabs/aws-lambda-powertools-typescript/workflows/Test/badge.svg?branch=main)
## Testing
The repo uses JEST tests, these can be run using
Expand All @@ -20,6 +20,11 @@ align them with the style guides. Please run this before creating a PR, and comm

`npm run lerna-format`

## Credits

* Structured logging initial implementation from [aws-lambda-logging](https://gitlab.com/hadrien/aws_lambda_logging)
* Powertools idea [DAZN Powertools](https://github.com/getndazn/dazn-lambda-powertools/)

## Security

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
Expand Down
2 changes: 2 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM squidfunk/mkdocs-material
RUN pip install mkdocs-git-revision-date-plugin
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[comment]: <> (Includes Changelog content entire file as a snippet)
--8<-- "CHANGELOG.md"
Loading