Skip to content

Commit

Permalink
Merge pull request #214 from kuzzleio/beta
Browse files Browse the repository at this point in the history
v1.0.0
  • Loading branch information
rolljee authored Dec 17, 2024
2 parents aec943b + 13b70a2 commit fb09dfb
Show file tree
Hide file tree
Showing 33 changed files with 11,235 additions and 11,416 deletions.
4 changes: 1 addition & 3 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ description: Run Build
runs:
using: "composite"
steps:
- name: update npm
run: npm install -g npm
shell: bash
- name: Install deps
run: npm ci
shell: bash

- name: Build and package the application
run: npm run build && npm pack
shell: bash
4 changes: 1 addition & 3 deletions .github/actions/es-lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ description: Run ESLint
runs:
using: "composite"
steps:
- name: update npm
run: npm install -g npm
shell: bash
- name: Install deps
run: npm ci
shell: bash

- name: Run lint tests
run: npm run test:lint
shell: bash
3 changes: 0 additions & 3 deletions .github/actions/functional-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ inputs:
runs:
using: "composite"
steps:
- name: update npm
run: npm install -g npm
shell: bash
- name: Run functional test
shell: bash
run: |
Expand Down
71 changes: 23 additions & 48 deletions .github/workflows/pull_request.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,79 +6,54 @@ jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ matrix.node-version }}
- uses: ./.github/actions/es-lint

build:
name: Build
runs-on: ubuntu-22.04
needs: [lint]
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: ${{ matrix.node-version }}
- uses: ./.github/actions/build
- name: Store build archive as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: kourou-build
name: kourou-build-${{ matrix.node-version }}
path: ./kourou-*.tgz

functional-test:
name: Functional Test - ${{ matrix.test-set }}
name: Functional Tests
runs-on: ubuntu-22.04
needs: [build]
strategy:
matrix:
node-version: [18, 20]
test-set: [stdout, cucumber]
steps:
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
NODE_ENV: test
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ matrix.node-version }}

- name: Recover previously built Kourou
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: kourou-build
name: kourou-build-${{ matrix.node-version }}

- name: Unpack and prepare artifact for tests
run: |
tar xfz ./kourou-*.tgz
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/push_branches.workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Run tests

on:
push:
branches:
- master
- beta

jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: ./.github/actions/es-lint

build:
name: Build
runs-on: ubuntu-22.04
needs: [lint]
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: ./.github/actions/build
- name: Store build archive as artifact
uses: actions/upload-artifact@v4
with:
name: kourou-build-${{ matrix.node-version }}
path: ./kourou-*.tgz

functional-test:
name: Functional Tests
runs-on: ubuntu-22.04
needs: [build]
strategy:
matrix:
node-version: [18, 20]
test-set: [stdout, cucumber]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Recover previously built Kourou
uses: actions/download-artifact@v4
with:
name: kourou-build-${{ matrix.node-version }}

- name: Unpack and prepare artifact for tests
run: |
tar xfz ./kourou-*.tgz
cp -fr .mocharc.json .nycrc tsconfig.json features test package/
- uses: ./.github/actions/functional-test
with:
test-set: ${{ matrix.test-set }}

release:
name: Release process
runs-on: ubuntu-22.04
needs: [functional-test]
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Install dependencies
run: |
npm clean-install
npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEMANTIC_RELEASE_SLACK_WEBHOOK: ${{ secrets.SEMANTIC_RELEASE_SLACK_WEBHOOK }}
run: npx semantic-release
91 changes: 0 additions & 91 deletions .github/workflows/push_dev.workflow.yml

This file was deleted.

Loading

0 comments on commit fb09dfb

Please sign in to comment.