From 2b112bd6f74d71fba7f22258810310e15b0e1787 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Fri, 6 Feb 2026 11:37:34 -0800 Subject: [PATCH] devops: add test and npm publish workflows --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ .github/workflows/publish.yml | 23 +++++++++++++++++++++++ .gitignore | 3 ++- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..df40e2c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-15, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm run test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1622c62 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,23 @@ +name: Publish +on: + workflow_dispatch: + release: + types: [published] + +jobs: + publish-npm: + if: github.event_name == 'release' + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # Required for OIDC npm publishing + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + # Ensure npm 11.5.1 or later is installed (for OIDC npm publishing) + - run: npm install -g npm@latest + - run: npm ci + - run: npm publish diff --git a/.gitignore b/.gitignore index 32e08d4..72b3529 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules/ .claude/ .vscode/ -/test-results/ \ No newline at end of file +/test-results/ +/.playwright-cli/ \ No newline at end of file