Skip to content

Commit

Permalink
feat: add semantic
Browse files Browse the repository at this point in the history
  • Loading branch information
rolljee committed Jan 15, 2025
1 parent 9c8f3df commit 5e2b100
Show file tree
Hide file tree
Showing 11 changed files with 10,083 additions and 753 deletions.
8 changes: 8 additions & 0 deletions .github/actions/install-packages/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Install Packages
description: Install necessary packages inside the CI

runs:
using: "composite"
steps:
- run: sudo apt install libunwind-dev libunwind8 build-essential libstdc++6 -y
shell: bash
10 changes: 10 additions & 0 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: ESLint
description: Run ESLint
runs:
using: "composite"
steps:
- name: Install deps
shell: bash
run: |
npm ci
npm run lint
10 changes: 10 additions & 0 deletions .github/actions/unit-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Functional Tests
description: Run Functional Tests
runs:
using: "composite"
steps:
- name: Run functional test
shell: bash
run: |
npm ci
npm run unit-testing
33 changes: 33 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--- If you have a question about Kuzzle usage, please use Stackoverflow instead >
<!--- Post here and we will respond https://stackoverflow.com/questions/ask >
<!--- Github issues are limited to bugs and features requests >
<!--- Provide a general summary of the issue in the Title above -->

## Expected Behavior
<!--- Tell us what should happen -->

## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->

## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. -->
<!--- Please try to provide scripts or commands to reproduce the bug -->
<!--- Use https://gist.github.com/ to host code snippets -->
1.
2.
3.
4.

## Context (Environment)
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
<!--- Include Node.js version, SDK version, Kuzzle version, ElasticSearch version, ... -->
Kuzzle version:
Node.js version:
SDK version:
45 changes: 45 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!--
This template is optional.
It simply serves to provide a guide to allow a better review of pull requests.
-->

<!--
IMPORTANT
Don't forget to add the corresponding "changelog:xxx" label to your PR.
This is part of our release process in order to generate the change log.
-->


## What does this PR do?
<!-- Please fill this section -->

<!--
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.
-->

### How should this be manually tested?

<!--
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration
-->
- Step 1 :
- Step 2 :
- Step 3 :
...

### Other changes

<!--
Please describe here all changes not directly linked to the main issue, but made because of it.
For instance: issues spotted during this PR and fixed on-the-fly, dependencies update, and so on
-->

### Boyscout

<!--
Describe here minor improvements in the code base and not directly linked to the main changes:
typos fixes, better/new comments, small code simplification, new debug messages, and so on.
-->
24 changes: 24 additions & 0 deletions .github/workflows/pull_request.workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pull request checks

on: [pull_request]

jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
strategy:
matrix:
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v4

- name: Install additional libraries
uses: ./.github/actions/install-packages

- name: Node version ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- uses: ./.github/actions/lint
42 changes: 42 additions & 0 deletions .github/workflows/push_branches.workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Push checks

on:
push:
branches:
- master
- beta

jobs:
release:
name: Release process
runs-on: ubuntu-24.04
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4

- name: Install additional libraries
uses: ./.github/actions/install-packages

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

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

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

This file was deleted.

Loading

0 comments on commit 5e2b100

Please sign in to comment.