feat(ci): Add GitHub Actions workflows for CI/CD
This commit is contained in:
		
							
								
								
									
										66
									
								
								.gitea/workflows/default_nottags.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								.gitea/workflows/default_nottags.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,66 @@ | |||||||
|  | name: Default (not tags) | ||||||
|  |  | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     tags-ignore: | ||||||
|  |       - '**' | ||||||
|  |  | ||||||
|  | env: | ||||||
|  |   IMAGE: code.foss.global/host.today/ht-docker-node:npmci | ||||||
|  |   NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{gitea.repository}}.git | ||||||
|  |   NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}} | ||||||
|  |   NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}} | ||||||
|  |   NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}} | ||||||
|  |   NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}} | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |   security: | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     continue-on-error: true | ||||||
|  |     container: | ||||||
|  |       image: ${{ env.IMAGE }} | ||||||
|  |  | ||||||
|  |     steps: | ||||||
|  |       - uses: actions/checkout@v3 | ||||||
|  |  | ||||||
|  |       - name: Install pnpm and npmci | ||||||
|  |         run: | | ||||||
|  |           pnpm install -g pnpm | ||||||
|  |           pnpm install -g @ship.zone/npmci | ||||||
|  |  | ||||||
|  |       - name: Run npm prepare | ||||||
|  |         run: npmci npm prepare | ||||||
|  |  | ||||||
|  |       - name: Audit production dependencies | ||||||
|  |         run: | | ||||||
|  |           npmci command npm config set registry https://registry.npmjs.org | ||||||
|  |           npmci command pnpm audit --audit-level=high --prod | ||||||
|  |         continue-on-error: true | ||||||
|  |  | ||||||
|  |       - name: Audit development dependencies | ||||||
|  |         run: | | ||||||
|  |           npmci command npm config set registry https://registry.npmjs.org | ||||||
|  |           npmci command pnpm audit --audit-level=high --dev | ||||||
|  |         continue-on-error: true | ||||||
|  |  | ||||||
|  |   test: | ||||||
|  |     if: ${{ always() }} | ||||||
|  |     needs: security | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     container: | ||||||
|  |       image: ${{ env.IMAGE }} | ||||||
|  |  | ||||||
|  |     steps: | ||||||
|  |       - uses: actions/checkout@v3 | ||||||
|  |  | ||||||
|  |       - name: Test stable | ||||||
|  |         run: | | ||||||
|  |           npmci node install stable | ||||||
|  |           npmci npm install | ||||||
|  |           npmci npm test | ||||||
|  |  | ||||||
|  |       - name: Test build | ||||||
|  |         run: | | ||||||
|  |           npmci node install stable | ||||||
|  |           npmci npm install | ||||||
|  |           npmci npm build | ||||||
							
								
								
									
										124
									
								
								.gitea/workflows/default_tags.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										124
									
								
								.gitea/workflows/default_tags.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,124 @@ | |||||||
|  | name: Default (tags) | ||||||
|  |  | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     tags: | ||||||
|  |       - '*' | ||||||
|  |  | ||||||
|  | env: | ||||||
|  |   IMAGE: code.foss.global/host.today/ht-docker-node:npmci | ||||||
|  |   NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{gitea.repository}}.git | ||||||
|  |   NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}} | ||||||
|  |   NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}} | ||||||
|  |   NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}} | ||||||
|  |   NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}} | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |   security: | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     continue-on-error: true | ||||||
|  |     container: | ||||||
|  |       image: ${{ env.IMAGE }} | ||||||
|  |  | ||||||
|  |     steps: | ||||||
|  |       - uses: actions/checkout@v3 | ||||||
|  |  | ||||||
|  |       - name: Prepare | ||||||
|  |         run: | | ||||||
|  |           pnpm install -g pnpm | ||||||
|  |           pnpm install -g @ship.zone/npmci | ||||||
|  |           npmci npm prepare | ||||||
|  |  | ||||||
|  |       - name: Audit production dependencies | ||||||
|  |         run: | | ||||||
|  |           npmci command npm config set registry https://registry.npmjs.org | ||||||
|  |           npmci command pnpm audit --audit-level=high --prod | ||||||
|  |         continue-on-error: true | ||||||
|  |  | ||||||
|  |       - name: Audit development dependencies | ||||||
|  |         run: | | ||||||
|  |           npmci command npm config set registry https://registry.npmjs.org | ||||||
|  |           npmci command pnpm audit --audit-level=high --dev | ||||||
|  |         continue-on-error: true | ||||||
|  |  | ||||||
|  |   test: | ||||||
|  |     if: ${{ always() }} | ||||||
|  |     needs: security | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     container: | ||||||
|  |       image: ${{ env.IMAGE }} | ||||||
|  |  | ||||||
|  |     steps: | ||||||
|  |       - uses: actions/checkout@v3 | ||||||
|  |  | ||||||
|  |       - name: Prepare | ||||||
|  |         run: | | ||||||
|  |           pnpm install -g pnpm | ||||||
|  |           pnpm install -g @ship.zone/npmci | ||||||
|  |           npmci npm prepare | ||||||
|  |  | ||||||
|  |       - name: Test stable | ||||||
|  |         run: | | ||||||
|  |           npmci node install stable | ||||||
|  |           npmci npm install | ||||||
|  |           npmci npm test | ||||||
|  |  | ||||||
|  |       - name: Test build | ||||||
|  |         run: | | ||||||
|  |           npmci node install stable | ||||||
|  |           npmci npm install | ||||||
|  |           npmci npm build | ||||||
|  |  | ||||||
|  |   release: | ||||||
|  |     needs: test | ||||||
|  |     if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     container: | ||||||
|  |       image: ${{ env.IMAGE }} | ||||||
|  |  | ||||||
|  |     steps: | ||||||
|  |       - uses: actions/checkout@v3 | ||||||
|  |  | ||||||
|  |       - name: Prepare | ||||||
|  |         run: | | ||||||
|  |           pnpm install -g pnpm | ||||||
|  |           pnpm install -g @ship.zone/npmci | ||||||
|  |           npmci npm prepare | ||||||
|  |  | ||||||
|  |       - name: Release | ||||||
|  |         run: | | ||||||
|  |           npmci node install stable | ||||||
|  |           npmci npm publish | ||||||
|  |  | ||||||
|  |   metadata: | ||||||
|  |     needs: test | ||||||
|  |     if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     container: | ||||||
|  |       image: ${{ env.IMAGE }} | ||||||
|  |     continue-on-error: true | ||||||
|  |  | ||||||
|  |     steps: | ||||||
|  |       - uses: actions/checkout@v3 | ||||||
|  |  | ||||||
|  |       - name: Prepare | ||||||
|  |         run: | | ||||||
|  |           pnpm install -g pnpm | ||||||
|  |           pnpm install -g @ship.zone/npmci | ||||||
|  |           npmci npm prepare | ||||||
|  |  | ||||||
|  |       - name: Code quality | ||||||
|  |         run: | | ||||||
|  |           npmci command npm install -g typescript | ||||||
|  |           npmci npm install | ||||||
|  |  | ||||||
|  |       - name: Trigger | ||||||
|  |         run: npmci trigger | ||||||
|  |  | ||||||
|  |       - name: Build docs and upload artifacts | ||||||
|  |         run: | | ||||||
|  |           npmci node install stable | ||||||
|  |           npmci npm install | ||||||
|  |           pnpm install -g @git.zone/tsdoc | ||||||
|  |           npmci command tsdoc | ||||||
|  |         continue-on-error: true | ||||||
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -3,7 +3,6 @@ | |||||||
| # artifacts | # artifacts | ||||||
| coverage/ | coverage/ | ||||||
| public/ | public/ | ||||||
| pages/ |  | ||||||
|  |  | ||||||
| # installs | # installs | ||||||
| node_modules/ | node_modules/ | ||||||
| @@ -17,4 +16,4 @@ node_modules/ | |||||||
| dist/ | dist/ | ||||||
| dist_*/ | dist_*/ | ||||||
|  |  | ||||||
| # custom | #------# custom | ||||||
							
								
								
									
										24
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							| @@ -2,28 +2,10 @@ | |||||||
|   "version": "0.2.0", |   "version": "0.2.0", | ||||||
|   "configurations": [ |   "configurations": [ | ||||||
|     { |     { | ||||||
|       "name": "current file", |       "command": "npm test", | ||||||
|       "type": "node", |       "name": "Run npm test", | ||||||
|       "request": "launch", |       "request": "launch", | ||||||
|       "args": [ |       "type": "node-terminal" | ||||||
|         "${relativeFile}" |  | ||||||
|       ], |  | ||||||
|       "runtimeArgs": ["-r", "@gitzone/tsrun"], |  | ||||||
|       "cwd": "${workspaceRoot}", |  | ||||||
|       "protocol": "inspector", |  | ||||||
|       "internalConsoleOptions": "openOnSessionStart" |  | ||||||
|     }, |  | ||||||
|     { |  | ||||||
|       "name": "test.ts", |  | ||||||
|       "type": "node", |  | ||||||
|       "request": "launch", |  | ||||||
|       "args": [ |  | ||||||
|         "test/test.ts" |  | ||||||
|       ], |  | ||||||
|       "runtimeArgs": ["-r", "@gitzone/tsrun"], |  | ||||||
|       "cwd": "${workspaceRoot}", |  | ||||||
|       "protocol": "inspector", |  | ||||||
|       "internalConsoleOptions": "openOnSessionStart" |  | ||||||
|     } |     } | ||||||
|   ] |   ] | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,5 +1,12 @@ | |||||||
| # Changelog | # Changelog | ||||||
|  |  | ||||||
|  | ## 2024-12-27 - 1.2.0 - feat(ci) | ||||||
|  | Add GitHub Actions workflows for CI/CD | ||||||
|  |  | ||||||
|  | - Implemented workflows for handling pushes and tags separately. | ||||||
|  | - Added job steps for security audits, testing, releasing, and metadata handling. | ||||||
|  | - Updated .vscode launch configuration to run tests with npm command. | ||||||
|  |  | ||||||
| ## 2024-12-27 - 1.1.0 - feat(core) | ## 2024-12-27 - 1.1.0 - feat(core) | ||||||
| Add TypeScript configuration and update package dependencies and scripts | Add TypeScript configuration and update package dependencies and scripts | ||||||
|  |  | ||||||
|   | |||||||
| @@ -5,10 +5,10 @@ | |||||||
|       "githost": "gitlab.com", |       "githost": "gitlab.com", | ||||||
|       "gitscope": "social.io/private", |       "gitscope": "social.io/private", | ||||||
|       "gitrepo": "interfaces", |       "gitrepo": "interfaces", | ||||||
|       "shortDescription": "an interface package for social.io", |  | ||||||
|       "npmPackagename": "@social.io_private/interfaces", |       "npmPackagename": "@social.io_private/interfaces", | ||||||
|       "license": "UNLICENSED", |       "license": "UNLICENSED", | ||||||
|       "projectDomain": "social.io" |       "projectDomain": "social.io", | ||||||
|  |       "description": "the interfaces for social.io" | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   "npmci": { |   "npmci": { | ||||||
|   | |||||||
							
								
								
									
										13
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								package.json
									
									
									
									
									
								
							| @@ -11,7 +11,8 @@ | |||||||
|   "scripts": { |   "scripts": { | ||||||
|     "test": "(tstest test/)", |     "test": "(tstest test/)", | ||||||
|     "build": "(tsbuild --web)", |     "build": "(tsbuild --web)", | ||||||
|     "format": "(gitzone format)" |     "format": "(gitzone format)", | ||||||
|  |     "buildDocs": "tsdoc" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@git.zone/tsbuild": "^2.1.66", |     "@git.zone/tsbuild": "^2.1.66", | ||||||
| @@ -37,5 +38,13 @@ | |||||||
|     "cli.js", |     "cli.js", | ||||||
|     "npmextra.json", |     "npmextra.json", | ||||||
|     "readme.md" |     "readme.md" | ||||||
|   ] |   ], | ||||||
|  |   "repository": { | ||||||
|  |     "type": "git", | ||||||
|  |     "url": "git+https://gitlab.com/social.io/private/interfaces.git" | ||||||
|  |   }, | ||||||
|  |   "bugs": { | ||||||
|  |     "url": "https://gitlab.com/social.io/private/interfaces/issues" | ||||||
|  |   }, | ||||||
|  |   "homepage": "https://gitlab.com/social.io/private/interfaces#readme" | ||||||
| } | } | ||||||
							
								
								
									
										38
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								readme.md
									
									
									
									
									
								
							| @@ -1,27 +1,29 @@ | |||||||
| # @social.io/private/interfaces | # @social.io/private/interfaces | ||||||
|  |  | ||||||
| an interface package for social.io | an interface package for social.io | ||||||
|  |  | ||||||
| ## Availabililty and Links | ## Availabililty and Links | ||||||
| * [npmjs.org (npm package)](https://www.npmjs.com/package/@social.io_private/interfaces) |  | ||||||
| * [gitlab.com (source)](https://gitlab.com/social.io/private/interfaces) | - [npmjs.org (npm package)](https://www.npmjs.com/package/@social.io_private/interfaces) | ||||||
| * [github.com (source mirror)](https://github.com/social.io/private/interfaces) | - [gitlab.com (source)](https://gitlab.com/social.io/private/interfaces) | ||||||
| * [docs (typedoc)](https://social.io/private.gitlab.io/interfaces/) | - [github.com (source mirror)](https://github.com/social.io/private/interfaces) | ||||||
|  | - [docs (typedoc)](https://social.io/private.gitlab.io/interfaces/) | ||||||
|  |  | ||||||
| ## Status for master | ## Status for master | ||||||
|  |  | ||||||
| Status Category | Status Badge | | Status Category                                 | Status Badge                                                                                                                                                                                                                                    | | ||||||
| -- | -- | | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||||||
| GitLab Pipelines | [](https://lossless.cloud) | | GitLab Pipelines                                | [](https://lossless.cloud)                                                                                                                        | | ||||||
| GitLab Pipline Test Coverage | [](https://lossless.cloud) | | GitLab Pipline Test Coverage                    | [](https://lossless.cloud)                                                                                                                        | | ||||||
| npm | [](https://lossless.cloud) | | npm                                             | [](https://lossless.cloud)                                                                                                                                   | | ||||||
| Snyk | [](https://lossless.cloud) | | Snyk                                            | [](https://lossless.cloud)                                                                                                                                        | | ||||||
| TypeScript Support | [](https://lossless.cloud) | | TypeScript Support                              | [](https://lossless.cloud)                                                                                                                                      | | ||||||
| node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/) | | node Support                                    | [](https://nodejs.org/dist/latest-v10.x/docs/api/)                                                                                                                               | | ||||||
| Code Style | [](https://lossless.cloud) | | Code Style                                      | [](https://lossless.cloud)                                                                                                                                                         | | ||||||
| PackagePhobia (total standalone install weight) | [](https://lossless.cloud) | | PackagePhobia (total standalone install weight) | [](https://lossless.cloud)                                                                                                                              | | ||||||
| PackagePhobia (package size on registry) | [](https://lossless.cloud) | | PackagePhobia (package size on registry)        | [](https://lossless.cloud)                                                                                                                              | | ||||||
| BundlePhobia (total size when bundled) | [](https://lossless.cloud) | | BundlePhobia (total size when bundled)          | [](https://lossless.cloud)                                                                                                                                 | | ||||||
| Platform support | [](https://lossless.cloud) [](https://lossless.cloud) | | Platform support                                | [](https://lossless.cloud) [](https://lossless.cloud) | | ||||||
|  |  | ||||||
| ## Usage | ## Usage | ||||||
|  |  | ||||||
| @@ -29,6 +31,6 @@ Use TypeScript for best in class intellisense | |||||||
| For further information read the linked docs at the top of this readme. | For further information read the linked docs at the top of this readme. | ||||||
|  |  | ||||||
| > UNLICENSED licensed | **©** [Lossless GmbH](https://lossless.gmbh) | > UNLICENSED licensed | **©** [Lossless GmbH](https://lossless.gmbh) | ||||||
| | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) | > | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) | ||||||
|  |  | ||||||
| [](https://maintainedby.lossless.com) | [](https://maintainedby.lossless.com) | ||||||
|   | |||||||
| @@ -3,6 +3,6 @@ | |||||||
|  */ |  */ | ||||||
| export const commitinfo = { | export const commitinfo = { | ||||||
|   name: '@social.io/interfaces', |   name: '@social.io/interfaces', | ||||||
|   version: '1.1.0', |   version: '1.2.0', | ||||||
|   description: 'an interface package for social.io' |   description: 'an interface package for social.io' | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,5 +1,3 @@ | |||||||
| import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces'; | import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces'; | ||||||
|  |  | ||||||
| export { | export { typedrequestInterfaces }; | ||||||
|   typedrequestInterfaces |  | ||||||
| } |  | ||||||
|   | |||||||
| @@ -29,7 +29,6 @@ export interface ISioSession { | |||||||
|     name: string; |     name: string; | ||||||
|     email: string; |     email: string; | ||||||
|     mobilePhone: string; |     mobilePhone: string; | ||||||
|  |  | ||||||
|   }; |   }; | ||||||
|   conversations: ISioConversation[]; |   conversations: ISioConversation[]; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,9 +1,10 @@ | |||||||
| import * as plugins from './interfaces.plugins.js'; | import * as plugins from './interfaces.plugins.js'; | ||||||
|  |  | ||||||
| export interface IRequest_GetSocialSession extends plugins.typedrequestInterfaces.implementsTR< | export interface IRequest_GetSocialSession | ||||||
|   plugins.typedrequestInterfaces.ITypedRequest, |   extends plugins.typedrequestInterfaces.implementsTR< | ||||||
|   IRequest_GetSocialSession |     plugins.typedrequestInterfaces.ITypedRequest, | ||||||
| > { |     IRequest_GetSocialSession | ||||||
|  |   > { | ||||||
|   method: 'getSocialSession'; |   method: 'getSocialSession'; | ||||||
|   request: { |   request: { | ||||||
|     existingSessionId?: string; |     existingSessionId?: string; | ||||||
| @@ -13,24 +14,26 @@ export interface IRequest_GetSocialSession extends plugins.typedrequestInterface | |||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
| export interface IRequest_AttachProfileId extends plugins.typedrequestInterfaces.implementsTR< | export interface IRequest_AttachProfileId | ||||||
| plugins.typedrequestInterfaces.ITypedRequest, |   extends plugins.typedrequestInterfaces.implementsTR< | ||||||
| IRequest_AttachProfileId |     plugins.typedrequestInterfaces.ITypedRequest, | ||||||
| > { |     IRequest_AttachProfileId | ||||||
| method: 'attachProfileId'; |   > { | ||||||
| request: { |   method: 'attachProfileId'; | ||||||
|   sessionId: string; |   request: { | ||||||
|   profileId: string; |     sessionId: string; | ||||||
| }; |     profileId: string; | ||||||
| response: { |   }; | ||||||
|   newSessionId: string; |   response: { | ||||||
| }; |     newSessionId: string; | ||||||
|  |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
| export interface IRequest_GetConversations extends plugins.typedrequestInterfaces.implementsTR< | export interface IRequest_GetConversations | ||||||
|   plugins.typedrequestInterfaces.ITypedRequest, |   extends plugins.typedrequestInterfaces.implementsTR< | ||||||
|   IRequest_GetConversations |     plugins.typedrequestInterfaces.ITypedRequest, | ||||||
| > { |     IRequest_GetConversations | ||||||
|  |   > { | ||||||
|   method: 'getConversations'; |   method: 'getConversations'; | ||||||
|   request: { |   request: { | ||||||
|     sessionId: string; |     sessionId: string; | ||||||
|   | |||||||
| @@ -6,7 +6,9 @@ | |||||||
|     "module": "NodeNext", |     "module": "NodeNext", | ||||||
|     "moduleResolution": "NodeNext", |     "moduleResolution": "NodeNext", | ||||||
|     "esModuleInterop": true, |     "esModuleInterop": true, | ||||||
|     "verbatimModuleSyntax": true |     "verbatimModuleSyntax": true, | ||||||
|  |     "baseUrl": ".", | ||||||
|  |     "paths": {} | ||||||
|   }, |   }, | ||||||
|   "exclude": [ |   "exclude": [ | ||||||
|     "dist_*/**/*.d.ts" |     "dist_*/**/*.d.ts" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user