Skip to content
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

feat: add semantic release and migrate CI environment #17

Merged
merged 10 commits into from
Aug 26, 2024
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
3 changes: 3 additions & 0 deletions .cz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "./node_modules/cz-conventional-changelog"
}
26 changes: 13 additions & 13 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"plugins": ["kuzzle"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
"plugin:kuzzle/default",
"plugin:kuzzle/node",
"plugin:kuzzle/typescript",
],
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-var-requires": 0
}
}
"overrides": [
{
"files": ["**/roles/*.ts", "**/collections/*.ts", "**tests/**/*.ts"],
"rules": {
"sort-keys": ["off"]
}
}
]
}
39 changes: 39 additions & 0 deletions .github/workflows/codeql.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL"

on:
pull_request:
branches: ["master", "2-dev"]
schedule:
- cron: "14 6 * * 5"

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

strategy:
fail-fast: false
matrix:
language: [javascript]

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
45 changes: 45 additions & 0 deletions .github/workflows/pull_request.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Pull request checks

on: [pull_request]

jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
strategy:
matrix:
node: [18]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run test:lint

tests:
name: Functional Tests
runs-on: ubuntu-22.04
strategy:
matrix:
node: [18]
needs: [lint]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install kourou
run: npm install -g kourou

- name: Install dependencies
run: npm ci

- name: run test
run: npm run test:unit

- name: functional tests
run: bash test/kuzzle-vault-encrypt-string.test.sh
39 changes: 39 additions & 0 deletions .github/workflows/push_branches.workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Push checks

on:
push:
branches:
- master
- beta

jobs:
release:
name: Release package
runs-on: ubuntu-22.04
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
SEMANTIC_RELEASE_NPM_PUBLISH: "true"
SEMANTIC_RELEASE_SLACK_WEBHOOK: ${{ secrets.SEMANTIC_RELEASE_SLACK_WEBHOOK }}
run: npx semantic-release
7 changes: 7 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": ["semantic-release-config-kuzzle"],
"branches": [
"master",
{ "name": "beta", "prerelease": true }
]
}
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# [2.1.0-beta.1](https://github.com/kuzzleio/kuzzle-vault/compare/v2.0.4...v2.1.0-beta.1) (2024-07-30)


### Bug Fixes

* **build:** fixing build ([6533ffd](https://github.com/kuzzleio/kuzzle-vault/commit/6533ffd22cb0cc80fac6d412d0be02aef8fd1451))
* **workflow:** add install for deps ([629702e](https://github.com/kuzzleio/kuzzle-vault/commit/629702ee896e640428477a35c8da7bee34340c0a))


### Features

* **semantic:** add semantic and github actions ([901fc44](https://github.com/kuzzleio/kuzzle-vault/commit/901fc44eda19d431c361553b704c9580ba0a260e))
Loading