From 0bf5dd824ba59ae08d274e32bebd58ee362e3023 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 2 Oct 2023 18:41:13 +0200 Subject: [PATCH 01/20] Added linting job to the CI workflow --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f620cbbd8..010b88f6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,17 @@ jobs: echo "DB_TYPE=sqlite" >> $GITHUB_ENV echo "DB_CONNSTRING=sqlite:database=$HOME/mydatabase.sqlite" >> $GITHUB_ENV + - name: Set up Node.JS + uses: actions/setup-node@v2 + with: + node-version: 20 + + - name: Install npm + run: npm install + + - name: Running linter + run: npm run lint + - name: Configure CMake working-directory: ${{github.workspace}} run: From e0902dfa648323f0645b8d0f3addc1e3b69eaba1 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 2 Oct 2023 23:48:38 +0200 Subject: [PATCH 02/20] fixing an issue with npm install --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 010b88f6f..901c7ab4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,7 @@ jobs: echo "DB_CONNSTRING=sqlite:database=$HOME/mydatabase.sqlite" >> $GITHUB_ENV - name: Set up Node.JS - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 20 From 26ceea08f96b7247994ea5f12de3212cab426453 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 2 Oct 2023 23:57:06 +0200 Subject: [PATCH 03/20] fixing an issue with npm install --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 901c7ab4b..7d9f8f958 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,9 @@ jobs: node-version: 20 - name: Install npm - run: npm install + run: npm init + npm install + - name: Running linter run: npm run lint From def1c35d2447d59998ac4210e1e3bcf6007cdd50 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Tue, 3 Oct 2023 00:12:17 +0200 Subject: [PATCH 04/20] fixng an issue with npm install --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d9f8f958..f24566378 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,11 +78,6 @@ jobs: with: node-version: 20 - - name: Install npm - run: npm init - npm install - - - name: Running linter run: npm run lint From de2c6f00558a6ecd70bbac8a4d5ca7bb91aad64b Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Tue, 3 Oct 2023 00:19:35 +0200 Subject: [PATCH 05/20] fixing an issue with npm --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f24566378..8b20b7ba4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,10 +73,10 @@ jobs: echo "DB_TYPE=sqlite" >> $GITHUB_ENV echo "DB_CONNSTRING=sqlite:database=$HOME/mydatabase.sqlite" >> $GITHUB_ENV - - name: Set up Node.JS - uses: actions/setup-node@v3 - with: - node-version: 20 + # - name: Set up Node.JS + # uses: actions/setup-node@v3 + # with: + # node-version: 20 - name: Running linter run: npm run lint From d74adaae480b642fcdfc9c8f9b5b076782aed918 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Tue, 3 Oct 2023 00:27:37 +0200 Subject: [PATCH 06/20] fixing an issue with npm --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b20b7ba4..ad818500c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,10 +73,14 @@ jobs: echo "DB_TYPE=sqlite" >> $GITHUB_ENV echo "DB_CONNSTRING=sqlite:database=$HOME/mydatabase.sqlite" >> $GITHUB_ENV - # - name: Set up Node.JS - # uses: actions/setup-node@v3 - # with: - # node-version: 20 + - name: Set up Node.JS + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Install npm dependencies + run: npm ci + - name: Running linter run: npm run lint From 8502cc02257b2ac4bb95991089925a5c3c66ae1a Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Fri, 6 Oct 2023 23:31:05 +0200 Subject: [PATCH 07/20] Added separate workflow for linting job --- .github/workflows/ci.yml | 14 +------------- .github/workflows/linting.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/linting.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad818500c..179ead3eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ env: BUILD_TYPE: Debug jobs: - + ## BUILD JOBS build: strategy: @@ -73,18 +73,6 @@ jobs: echo "DB_TYPE=sqlite" >> $GITHUB_ENV echo "DB_CONNSTRING=sqlite:database=$HOME/mydatabase.sqlite" >> $GITHUB_ENV - - name: Set up Node.JS - uses: actions/setup-node@v3 - with: - node-version: 20 - - - name: Install npm dependencies - run: npm ci - - - - name: Running linter - run: npm run lint - - name: Configure CMake working-directory: ${{github.workspace}} run: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 000000000..8c0b5f202 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,28 @@ +name: Frontend linting + +on: [push, pull_request, workflow_dispatch] + +jobs: + linting: + runs-on: ubuntu-20.04 + defaults: + run: + working-directory: ./webgui-new/ + + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: setup Node.JS + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: install npm + uses: npm install + + - name: run linter + run: npm run lint + + + From 22450a8c4ed58a762b945f3a42becf9fbc7faac6 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Sun, 8 Oct 2023 14:54:26 +0200 Subject: [PATCH 08/20] Fixed an error --- .github/workflows/linting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 8c0b5f202..cb5c2d254 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -19,7 +19,7 @@ jobs: node-version: 20 - name: install npm - uses: npm install + run: npm install - name: run linter run: npm run lint From 9bec5ccfab4d22b49dbd914bc171cc086716d546 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Sun, 8 Oct 2023 21:24:11 +0200 Subject: [PATCH 09/20] Linting job is now called from ci.yml --- .github/workflows/ci.yml | 5 +++++ .github/workflows/linting.yml | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 179ead3eb..146ded647 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,11 @@ env: jobs: + ## LINTING JOBS + linting: + uses: ./.github/workflows/linting.yml + + ## BUILD JOBS build: strategy: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index cb5c2d254..d6cd4f44a 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,6 +1,9 @@ name: Frontend linting -on: [push, pull_request, workflow_dispatch] +# on: [push, pull_request, workflow_dispatch] +on: + workflow_dispatch: + workflow_call: jobs: linting: From 70c8d2776588e6f678e646e1b3050e78a1299ff8 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Sun, 8 Oct 2023 21:46:39 +0200 Subject: [PATCH 10/20] Added caching to the linting job --- .github/workflows/linting.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index d6cd4f44a..0f38a574f 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -23,6 +23,14 @@ jobs: - name: install npm run: npm install + + - name: cache npm + uses: actions/cache@v3 + env: + cache-name: npm_cache + with: + path: ./webgui-new/ + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} - name: run linter run: npm run lint From 56c8bcb5e4327ff4b90c96f6d6c4513ec91f4036 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Sun, 8 Oct 2023 21:57:33 +0200 Subject: [PATCH 11/20] Changed caching --- .github/workflows/linting.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 0f38a574f..bb945b7b9 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -20,18 +20,18 @@ jobs: uses: actions/setup-node@v3 with: node-version: 20 - - - name: install npm - run: npm install - name: cache npm uses: actions/cache@v3 env: cache-name: npm_cache with: - path: ./webgui-new/ + path: ~/.npm key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + - name: install npm + run: npm install + - name: run linter run: npm run lint From a412953a29d961c0af50afc09fdd38363ed6df06 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 23 Oct 2023 16:15:39 +0200 Subject: [PATCH 12/20] Changed caching and made the workflow standalone --- .github/workflows/ci.yml | 6 +++--- .github/workflows/linting.yml | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 146ded647..4550ed24b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,9 @@ env: jobs: - ## LINTING JOBS - linting: - uses: ./.github/workflows/linting.yml + # ## LINTING JOBS + # linting: + # uses: ./.github/workflows/linting.yml ## BUILD JOBS diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index bb945b7b9..e536dcfe8 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,9 +1,9 @@ name: Frontend linting -# on: [push, pull_request, workflow_dispatch] -on: - workflow_dispatch: - workflow_call: +on: [push, pull_request, workflow_dispatch] +# on: +# workflow_dispatch: +# workflow_call: jobs: linting: @@ -26,7 +26,8 @@ jobs: env: cache-name: npm_cache with: - path: ~/.npm + # path: ~/.npm + path: /usr/lib/node_modules key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} - name: install npm From 91ad4250e77555cf7b1fd0e1417aca338c94fa66 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 23 Oct 2023 16:24:53 +0200 Subject: [PATCH 13/20] Changed cache path --- .github/workflows/ci.yml | 5 +---- .github/workflows/linting.yml | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4550ed24b..35eab0860 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,10 +6,7 @@ env: BUILD_TYPE: Debug jobs: - - # ## LINTING JOBS - # linting: - # uses: ./.github/workflows/linting.yml + ## BUILD JOBS diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index e536dcfe8..1fac4e30b 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,9 +1,6 @@ name: Frontend linting on: [push, pull_request, workflow_dispatch] -# on: -# workflow_dispatch: -# workflow_call: jobs: linting: @@ -26,8 +23,7 @@ jobs: env: cache-name: npm_cache with: - # path: ~/.npm - path: /usr/lib/node_modules + path: node_modules key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} - name: install npm From 2c88d316b522a6e81beb9895cbe78eb3bce17da5 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 23 Oct 2023 16:50:04 +0200 Subject: [PATCH 14/20] Changed cache key and added restore key --- .github/workflows/linting.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 1fac4e30b..3eca4fecc 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -16,18 +16,19 @@ jobs: - name: setup Node.JS uses: actions/setup-node@v3 with: + cache: 'npm' node-version: 20 - - name: cache npm + - name: install npm + run: npm install + + - name: cache node modules uses: actions/cache@v3 - env: - cache-name: npm_cache with: path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} - - - name: install npm - run: npm install + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm- - name: run linter run: npm run lint From f873ba0af5b656b4e37057d3d774201ba22f9e37 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 23 Oct 2023 16:52:18 +0200 Subject: [PATCH 15/20] Fixed an error --- .github/workflows/linting.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 3eca4fecc..189b62ec9 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -16,7 +16,6 @@ jobs: - name: setup Node.JS uses: actions/setup-node@v3 with: - cache: 'npm' node-version: 20 - name: install npm From 3bdb92b2cf83b7456b3a35764ac848a8e67f4ea6 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 23 Oct 2023 17:09:34 +0200 Subject: [PATCH 16/20] Changed the path for caching --- .github/workflows/linting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 189b62ec9..7a9806bf7 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -24,7 +24,7 @@ jobs: - name: cache node modules uses: actions/cache@v3 with: - path: node_modules + path: ./webgui-new/node_modules key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-npm- From b89e356e024a0cc89f349bf7da74e1a5fb954665 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 23 Oct 2023 17:14:32 +0200 Subject: [PATCH 17/20] Added condition to npm install --- .github/workflows/linting.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 7a9806bf7..fc45fafee 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -19,9 +19,11 @@ jobs: node-version: 20 - name: install npm + if: steps.cache_node_modules.outputs.cache-hit != 'true' run: npm install - name: cache node modules + id: cache_node_modules uses: actions/cache@v3 with: path: ./webgui-new/node_modules From 86786463b0831ecadd0e873dd686893cff8f27c8 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 23 Oct 2023 17:21:25 +0200 Subject: [PATCH 18/20] Fixed an error --- .github/workflows/linting.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index fc45fafee..a13242b8c 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -17,10 +17,6 @@ jobs: uses: actions/setup-node@v3 with: node-version: 20 - - - name: install npm - if: steps.cache_node_modules.outputs.cache-hit != 'true' - run: npm install - name: cache node modules id: cache_node_modules @@ -31,6 +27,10 @@ jobs: restore-keys: | ${{ runner.os }}-npm- + - name: install npm + if: steps.cache_node_modules.outputs.cache-hit != 'true' + run: npm install + - name: run linter run: npm run lint From 3bdf9dc4013757a16319f8731419eb8c8e4c02b7 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 23 Oct 2023 17:32:00 +0200 Subject: [PATCH 19/20] Added cache to setup-node step --- .github/workflows/linting.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index a13242b8c..a471642bb 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -17,6 +17,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: 20 + cache: 'npm' - name: cache node modules id: cache_node_modules From def75b65468f0510e3f90543bca4a0eae0190010 Mon Sep 17 00:00:00 2001 From: Klein Kristof Date: Mon, 23 Oct 2023 17:39:27 +0200 Subject: [PATCH 20/20] Fixed an error --- .github/workflows/linting.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index a471642bb..55c3aab14 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -18,6 +18,7 @@ jobs: with: node-version: 20 cache: 'npm' + cache-dependency-path: ./webgui-new/package-lock.json - name: cache node modules id: cache_node_modules