From cac1df6f6eabadcf52d6f6d6ae7681ea17c8f098 Mon Sep 17 00:00:00 2001 From: Quentin Aupetit Date: Thu, 26 Mar 2026 16:04:30 +0100 Subject: [PATCH 1/7] create github actions workflow for CI --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cb0c26e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: Continuous Integration + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run linter + run: npm run lint + + - name: Check formatting + run: npm run format:check + + - name: Install JUnit coverage reporter + run: npm install --save-dev jest-junit + + - name: Run tests + run: npm test -- --ci --reporters=default --reporters=jest-junit + + - name: Build + run: npm run build + + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: test-results + path: jest-junit.xml From 81394f2c0f35b33ab265e4fb1e4c07ca4a4a796b Mon Sep 17 00:00:00 2001 From: Quentin Aupetit Date: Thu, 26 Mar 2026 16:07:43 +0100 Subject: [PATCH 2/7] updaue banch targets --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb0c26e..796090c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,13 @@ on: push: branches: - main + - master + - develop pull_request: branches: - main + - master + - develop jobs: test: From cfd2bbc2260ce81fbc06db8304aa55f0f11fad88 Mon Sep 17 00:00:00 2001 From: Quentin Aupetit Date: Thu, 26 Mar 2026 16:09:59 +0100 Subject: [PATCH 3/7] name job & comments format:ckeck --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 796090c..02d1db3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,7 @@ on: jobs: test: + name: Build & Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -29,8 +30,8 @@ jobs: - name: Run linter run: npm run lint - - name: Check formatting - run: npm run format:check + # - name: Check formatting + # run: npm run format:check - name: Install JUnit coverage reporter run: npm install --save-dev jest-junit From b9bf0be6128becf9c7bb09e83429733e1b3bef32 Mon Sep 17 00:00:00 2001 From: Quentin Aupetit Date: Thu, 26 Mar 2026 16:22:04 +0100 Subject: [PATCH 4/7] add release workflow & remove CircleCi workflows --- .circleci/config.yml | 89 ---------------------------- .github/workflows/deploy-release.yml | 30 ++++++++++ 2 files changed, 30 insertions(+), 89 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/deploy-release.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 9719d09..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,89 +0,0 @@ -# Javascript Node CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-javascript/ for more details - -version: 2 - -defaults: &defaults - working_directory: ~/repo - docker: - - image: circleci/node - -jobs: - test: - <<: *defaults - steps: - - checkout - - run: - name: Install dependancies - command: npm ci - - run: - name: Lint - command: npm run lint - - run: - name: Build - command: npm run build - - run: - name: Install JUnit coverage reporter - command: npm install --save-dev jest-junit - - run: - name: Run tests - command: npx jest --listTests | circleci tests run --command="JEST_JUNIT_ADD_FILE_ATTRIBUTE=true xargs npx jest --config jest.config.json --silent --runInBand --" --verbose --split-by=timings - environment: - JEST_JUNIT_OUTPUT_DIR: ./reports/ - - store_test_results: - path: ./reports/ - - persist_to_workspace: - root: ~/repo - paths: - - . - - deploy-alpha: - <<: *defaults - steps: - - attach_workspace: - at: ~/repo - - run: - name: Authenticate with registry - command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc - - run: - name: Publish package - command: npm publish --tag alpha - - deploy-release: - <<: *defaults - steps: - - attach_workspace: - at: ~/repo - - run: - name: Publish to npm - command: | - npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN - npm publish - -workflows: - version: 2 - npm-deploy: - jobs: - - test: - filters: - tags: - only: /.*/ - - deploy-alpha: - context: reachfive - requires: - - test - filters: - tags: - only: /^v.*-alpha\.[0-9]/ - branches: - ignore: /.*/ - - deploy-release: - context: reachfive - requires: - - test - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml new file mode 100644 index 0000000..ec9ab32 --- /dev/null +++ b/.github/workflows/deploy-release.yml @@ -0,0 +1,30 @@ +name: Deploy Release + +on: + push: + tags: + - 'v*' + +jobs: + deploy: + name: Deploy Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Publish to NPM + run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file From ee3b39a97a1a61431ef51535aa986d5a2695f71e Mon Sep 17 00:00:00 2001 From: Quentin Aupetit Date: Thu, 26 Mar 2026 16:27:47 +0100 Subject: [PATCH 5/7] add JEST_JUNIT_OUTPUT_NAME env var --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02d1db3..e09478e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,3 +47,5 @@ jobs: with: name: test-results path: jest-junit.xml + env: + JEST_JUNIT_OUTPUT_NAME: jest-junit.xml From 1101451b4916f45563615528f15385645a9dab8a Mon Sep 17 00:00:00 2001 From: Quentin Aupetit Date: Fri, 27 Mar 2026 09:55:40 +0100 Subject: [PATCH 6/7] add publish permissions --- .github/workflows/deploy-release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index ec9ab32..c9ef3c4 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -9,6 +9,9 @@ jobs: deploy: name: Deploy Release runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v5 From 60a46ac2088752b626577718f14b89a62f20c33c Mon Sep 17 00:00:00 2001 From: Quentin Aupetit Date: Fri, 27 Mar 2026 15:01:02 +0100 Subject: [PATCH 7/7] bump node version to v24 (lts support) --- .github/workflows/ci.yml | 2 +- .github/workflows/deploy-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e09478e..e7ab8f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 cache: 'npm' - name: Install dependencies diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index c9ef3c4..457f54d 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 cache: 'npm' registry-url: 'https://registry.npmjs.org'