From 1f4d69bbe377fea7e00c9254b000b0dcaed005ff Mon Sep 17 00:00:00 2001 From: bidule Date: Fri, 26 Jan 2024 12:43:38 +0100 Subject: [PATCH 01/12] clean circle-ci --- .circleci/config.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 73c7aa2a60..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: 2.1 - -jobs: - dummy: - docker: - - image: cimg/node:16.20-browsers - steps: - - run: echo "Hello World" - -workflows: - build-deploy: - jobs: - - dummy: - filters: - branches: - only: v2 From 36af44385258b3be9022838646302570b90db74e Mon Sep 17 00:00:00 2001 From: bidule Date: Fri, 26 Jan 2024 12:55:42 +0100 Subject: [PATCH 02/12] add github-action with 2 jobs - build: install dependacy - npm-publish: publish on npm using token wip - test with event in github - test with the token the publish job --- .github/workflows/npm-publish.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000000..26762e4fd4 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,38 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - uses: pnpm/action-setup@v2 + with: + version: 8 + + - uses: actions/setup-node@v3 + with: + node-version: 20.11.0 +# cache: 'pnpm' + - run: corepack enable + - run: pnpm install --frozen-lockfile + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20.11.0 + registry-url: https://registry.npmjs.org/ + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} From 67d3481e1294b23df0ad561032fbe992ef6f2c66 Mon Sep 17 00:00:00 2001 From: bidule Date: Fri, 26 Jan 2024 12:56:18 +0100 Subject: [PATCH 03/12] use correct version for node and pnpm --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 96dc9edaeb..9747f1b790 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "typescript": "5.2.2" }, "engines": { - "node": ">=18.0.0", - "pnpm": ">=8.0.0" + "node": "^20.11.0", + "pnpm": "^8.0.0" } } From 1196fb162422abecb3b6c319b0db07fe6c3bc2b0 Mon Sep 17 00:00:00 2001 From: bidule Date: Tue, 30 Jan 2024 16:44:59 +0100 Subject: [PATCH 04/12] have package.json valid with https://github.com/logue/vite-vuetify-ts-starter/tree/master --- package.json | 3 ++- packages/synapse-bridge/package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9747f1b790..85cb1a61fd 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "scripts": { "prepare": "lerna run dev:setup", "dev": "lerna run dev", - "test:unit": "lerna run test:unit", + "test": "lerna run test", + "lint": "lerna run lint", "build": "lerna run build" }, "devDependencies": { diff --git a/packages/synapse-bridge/package.json b/packages/synapse-bridge/package.json index 30465e7344..62c1f4a31b 100644 --- a/packages/synapse-bridge/package.json +++ b/packages/synapse-bridge/package.json @@ -25,7 +25,8 @@ "scripts": { "dev:setup": "tsx scripts/devSetup.ts", "dev": "vite", - "test:unit": "vitest run", + "test": "vitest run", + "lint": "echo 1", "preview": "vite preview", "analyze": "vite build --mode analyze", "build": "vue-tsc && vite build" From 8da7309838bacaaf4dc852cc760d459cee2accc3 Mon Sep 17 00:00:00 2001 From: bidule Date: Tue, 30 Jan 2024 16:45:35 +0100 Subject: [PATCH 05/12] refacto github action add CI with test and lint refacto publish --- .github/workflows/ci.yml | 10 ++++++++ .github/workflows/npm-publish.yml | 41 +++++++++++-------------------- actions/ci.yml | 30 ++++++++++++++++++++++ 3 files changed, 54 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 actions/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..e51cf1ad9a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,10 @@ +name: Library DS CI + +on: + pull_request: + +jobs: + ci: + uses: ./actions/build.yml + + diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 26762e4fd4..44a9023de2 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,38 +1,25 @@ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages -name: Node.js Package +name: Library DS Package and Publish on: release: types: [created] jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2 - with: - version: 8 + validate: + uses: ./actions/ci.yml - - uses: actions/setup-node@v3 - with: + publish-npm: + needs: validate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: node-version: 20.11.0 -# cache: 'pnpm' - - run: corepack enable - - run: pnpm install --frozen-lockfile - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 20.11.0 - registry-url: https://registry.npmjs.org/ - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + registry-url: https://registry.npmjs.org/ + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/actions/ci.yml b/actions/ci.yml new file mode 100644 index 0000000000..dde7ea43ac --- /dev/null +++ b/actions/ci.yml @@ -0,0 +1,30 @@ +env: + NODE_VERSION: 20.11.0 + PNPM_VERSION: 8 + +on: + workflow_call: + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install pnpm ${{ env.PNPM_VERSION }} + uses: pnpm/action-setup@v2 + with: + version: ${{ env.PNPM_VERSION }} + + - name: Install node ${{ env.NODE_VERSION }} + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + # cache: 'pnpm' + - run: corepack enable + - name : install dependency + run: pnpm install --frozen-lockfile + - name: lint test + run: pnpm lint + - name : run test + run: pnpm test From 459633f3e6c25824996aaad92d8d3184beae8403 Mon Sep 17 00:00:00 2001 From: bidule Date: Tue, 30 Jan 2024 16:53:29 +0100 Subject: [PATCH 06/12] review @dylan --- .circleci/config.yml | 0 .github/workflows/ci.yml | 2 +- .github/workflows/npm-publish.yml | 9 ++++++--- actions/ci.yml | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e51cf1ad9a..6948fbf831 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Library DS CI +name: Library DS CI - Synpase on: pull_request: diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 44a9023de2..87d8c4d160 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,7 +1,10 @@ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages -name: Library DS Package and Publish +name: Library DS Package and Publish - Synpase + +env: + NODE_VERSION: 20.11.0 on: release: @@ -18,8 +21,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 20.11.0 + node-version: ${{ env.NODE_VERSION }} registry-url: https://registry.npmjs.org/ - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{SECRETS.NPM_TOKEN}} diff --git a/actions/ci.yml b/actions/ci.yml index dde7ea43ac..e23b1c5bc3 100644 --- a/actions/ci.yml +++ b/actions/ci.yml @@ -20,7 +20,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} - # cache: 'pnpm' + cache: 'pnpm' - run: corepack enable - name : install dependency run: pnpm install --frozen-lockfile From a2232b986b9709404e8644b3b62981ee81de03b7 Mon Sep 17 00:00:00 2001 From: bidule Date: Tue, 30 Jan 2024 19:02:06 +0100 Subject: [PATCH 07/12] review @chris --- .github/workflows/ci.yml | 2 +- .github/workflows/npm-publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6948fbf831..b71d77f920 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,6 @@ on: jobs: ci: - uses: ./actions/build.yml + uses: ./actions/ci.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 87d8c4d160..d427bd47e3 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -25,4 +25,4 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npm publish env: - NODE_AUTH_TOKEN: ${{SECRETS.NPM_TOKEN}} + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} From b3b85f6772fcb1650e714fa8e5f5f078141b6d50 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 8 Mar 2024 08:45:20 +0100 Subject: [PATCH 08/12] Apply suggestions from code review review @dylan Co-authored-by: Dylan Broussard --- .github/workflows/ci.yml | 3 +-- .github/workflows/npm-publish.yml | 4 ++-- actions/ci.yml | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b71d77f920..83dd08ffd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Library DS CI - Synpase +name: Synpase on: pull_request: @@ -7,4 +7,3 @@ jobs: ci: uses: ./actions/ci.yml - diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index d427bd47e3..ca7d509d0e 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,7 +1,7 @@ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages -name: Library DS Package and Publish - Synpase +name: Synpase - Package and Publish env: NODE_VERSION: 20.11.0 @@ -25,4 +25,4 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/actions/ci.yml b/actions/ci.yml index e23b1c5bc3..5d82ce4a7a 100644 --- a/actions/ci.yml +++ b/actions/ci.yml @@ -22,9 +22,9 @@ jobs: node-version: ${{ env.NODE_VERSION }} cache: 'pnpm' - run: corepack enable - - name : install dependency + - name: install dependency run: pnpm install --frozen-lockfile - name: lint test run: pnpm lint - - name : run test + - name: run test run: pnpm test From 2ce1b1d729c37d1c5f53fed819d4bae60adcc64b Mon Sep 17 00:00:00 2001 From: bidule Date: Fri, 8 Mar 2024 09:04:58 +0100 Subject: [PATCH 09/12] variabiliser le cache du node --- actions/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actions/ci.yml b/actions/ci.yml index 5d82ce4a7a..9e434092e6 100644 --- a/actions/ci.yml +++ b/actions/ci.yml @@ -1,6 +1,7 @@ env: NODE_VERSION: 20.11.0 PNPM_VERSION: 8 + PNPM_CACHE: on: workflow_call: @@ -20,7 +21,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} - cache: 'pnpm' + cache: '${{ env.NODE_CACHE }}' - run: corepack enable - name: install dependency run: pnpm install --frozen-lockfile From 7728cb4c3a7d09af691068b55e7ae4b1c1bf5ff7 Mon Sep 17 00:00:00 2001 From: bidule Date: Fri, 8 Mar 2024 14:07:04 +0100 Subject: [PATCH 10/12] rollback config.yml sur circleCI --- .circleci/config.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e69de29bb2..73c7aa2a60 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -0,0 +1,16 @@ +version: 2.1 + +jobs: + dummy: + docker: + - image: cimg/node:16.20-browsers + steps: + - run: echo "Hello World" + +workflows: + build-deploy: + jobs: + - dummy: + filters: + branches: + only: v2 From b109386082c86e618a9e6d48416420f7ec0e262c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oc=C3=A9an?= <46847941+oc8@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:02:45 +0100 Subject: [PATCH 11/12] test CI on PR --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83dd08ffd0..60b9101cd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,4 +6,3 @@ on: jobs: ci: uses: ./actions/ci.yml - From d6bad9d1022fa1197a40be6f597dccef5d13aca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oc=C3=A9an?= <46847941+oc8@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:40:24 +0100 Subject: [PATCH 12/12] test CI on PR --- .github/workflows/ci.yml | 27 ++++++++++++++++++++++++++- actions/ci.yml | 31 ------------------------------- 2 files changed, 26 insertions(+), 32 deletions(-) delete mode 100644 actions/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60b9101cd5..6c7bfefb01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,31 @@ name: Synpase on: pull_request: +env: + NODE_VERSION: 20.11.0 + PNPM_VERSION: 8 + PNPM_CACHE: + jobs: ci: - uses: ./actions/ci.yml + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install pnpm ${{ env.PNPM_VERSION }} + uses: pnpm/action-setup@v2 + with: + version: ${{ env.PNPM_VERSION }} + + - name: Install node ${{ env.NODE_VERSION }} + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + cache: '${{ env.NODE_CACHE }}' + - run: corepack enable + - name: install dependency + run: pnpm install --frozen-lockfile + - name: lint test + run: pnpm lint + - name: run test + run: pnpm test diff --git a/actions/ci.yml b/actions/ci.yml deleted file mode 100644 index 9e434092e6..0000000000 --- a/actions/ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -env: - NODE_VERSION: 20.11.0 - PNPM_VERSION: 8 - PNPM_CACHE: - -on: - workflow_call: - -jobs: - ci: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install pnpm ${{ env.PNPM_VERSION }} - uses: pnpm/action-setup@v2 - with: - version: ${{ env.PNPM_VERSION }} - - - name: Install node ${{ env.NODE_VERSION }} - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_VERSION }} - cache: '${{ env.NODE_CACHE }}' - - run: corepack enable - - name: install dependency - run: pnpm install --frozen-lockfile - - name: lint test - run: pnpm lint - - name: run test - run: pnpm test