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

Update dependencies and GitHub actions #34

Merged
merged 12 commits into from
Feb 1, 2024
2 changes: 1 addition & 1 deletion .github/actions/unit-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
steps:
- name: Run build
run: |
npm install
npm ci
npm run build
shell: bash
- name: Run tests
Expand Down
33 changes: 15 additions & 18 deletions .github/workflows/pull_request.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ on: [pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-18.04
timeout-minutes: 30
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand All @@ -20,19 +19,18 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1.4.4
- uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "18.17.1"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not enough to just use the latest minor of Node.js 18?

Suggested change
node-version: "18.17.1"
node-version: "18"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried, it seems that mocha, typescript and ESM module are bugged with the last version of Node 18, but it is working in the targeted 18.17.1 idk why ...

- uses: ./.github/actions/lint

unit-tests:
name: Unit Tests
runs-on: ubuntu-18.04
timeout-minutes: 30
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand All @@ -42,20 +40,19 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1.4.4
- uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "18.17.1"
- uses: ./.github/actions/unit-tests

functional-tests:
name: Functional Tests
runs-on: ubuntu-18.04
timeout-minutes: 30
runs-on: ubuntu-20.04
needs: ['unit-tests', lint]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand All @@ -65,7 +62,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1.4.4
- uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "18.17.1"
- uses: ./.github/actions/functional-tests
33 changes: 15 additions & 18 deletions .github/workflows/push_dev.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ on:
jobs:
lint:
name: Lint
runs-on: ubuntu-18.04
timeout-minutes: 30
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand All @@ -23,19 +22,18 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1.4.4
- uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "18.17.1"
- uses: ./.github/actions/lint

unit-tests:
name: Unit Tests
runs-on: ubuntu-18.04
timeout-minutes: 30
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand All @@ -45,20 +43,19 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1.4.4
- uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "18.17.1"
- uses: ./.github/actions/unit-tests

functional-tests:
name: Functional Tests
runs-on: ubuntu-18.04
timeout-minutes: 30
runs-on: ubuntu-20.04
needs: [unit-tests, lint]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand All @@ -68,7 +65,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1.4.4
- uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "18.17.1"
- uses: ./.github/actions/functional-tests
39 changes: 18 additions & 21 deletions .github/workflows/push_master.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ on:
jobs:
lint:
name: Lint
runs-on: ubuntu-18.04
timeout-minutes: 30
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand All @@ -23,19 +22,18 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1.4.4
- uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "18.17.1"
- uses: ./.github/actions/lint

unit-tests:
name: Unit Tests
runs-on: ubuntu-18.04
timeout-minutes: 30
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand All @@ -45,20 +43,19 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1.4.4
- uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "18.17.1"
- uses: ./.github/actions/unit-tests

functional-tests:
name: Functional Tests
runs-on: ubuntu-18.04
timeout-minutes: 30
runs-on: ubuntu-20.04
needs: ['unit-tests', lint]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand All @@ -68,19 +65,19 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1.4.4
- uses: actions/setup-node@v4
with:
node-version: "14"
node-version: "18.17.1"
- uses: ./.github/actions/functional-tests

npm-deploy:
name: Publish Package to NPM.js
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: [functional-tests]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand Down
4 changes: 3 additions & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"$schema": "https://json.schemastore.org/mocharc",
"extension": ["ts"],
"loader": "ts-node/esm",
"reporter": "dot",
"recursive": true,
"slow": 2000,
"timeout": 10000,
"require": ["ts-node/register"],
"spec": "./tests/unit/*.spec.ts"
}
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ services:
- "/var/run/docker.sock:/var/run/docker.sock:ro"

kuzzle-installer:
image: kuzzleio/kuzzle-runner
image: kuzzleio/kuzzle-runner:18
container_name: kuzzle-installer
command: bash -c "npm install"
command: bash -c "npm ci"
volumes:
- .:/var/app

kuzzle:
image: kuzzleio/kuzzle-runner
image: kuzzleio/kuzzle-runner:18
command: bash -c "npm run dev"
volumes:
- ".:/var/app"
Expand Down
Loading
Loading