Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/browser-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Browser Tests

on:
workflow_dispatch:
schedule:
- cron: "0 10 * * 1"

concurrency:
group: browser-tests-${{ github.ref }}
cancel-in-progress: true

jobs:
chromium:
name: Chromium browser tests
runs-on: ubuntu-latest
timeout-minutes: 30

permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Use Node.js 24
uses: actions/setup-node@v5
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci

- name: Run browser validation
run: npm run validate:browsers
36 changes: 36 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
quality:
name: Package quality checks
runs-on: ubuntu-latest
timeout-minutes: 10

permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Use Node.js 24
uses: actions/setup-node@v5
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci

- name: Validate package
run: npm run validate:ci
18 changes: 13 additions & 5 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ on:
types: [published]
workflow_dispatch:

concurrency:
group: npm-publish-${{ github.ref }}
cancel-in-progress: false

jobs:
publish:
name: Publish package
runs-on: ubuntu-latest
timeout-minutes: 10

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v5

- name: Use Node.js 24
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 24
registry-url: https://registry.npmjs.org/
Expand All @@ -25,10 +33,10 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Validate package
run: npm run validate
- name: Validate publish package
run: npm run validate:publish

- name: Publish to npm
run: npm publish --provenance --access public --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 17 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "interactive-surface-css",
"version": "1.2.4",
"version": "1.2.5",
"description": "A framework-agnostic, accessible CSS interaction primitive for buttons, cards, and icon controls with token-driven theming.",
"keywords": [
"css",
Expand Down Expand Up @@ -64,15 +64,25 @@
"scripts": {
"check:no-hex-colors": "node ./scripts/check-no-hex-colors.mjs",
"lint:css": "stylelint interactive-surface.css",
"test:install": "playwright install --with-deps chromium firefox webkit",
"test": "playwright test --config=./playwright.config.mjs",
"test:chromium": "playwright test --config=./playwright.config.mjs --project=chromium",

"pack:dry": "npm pack --dry-run --cache ./.npm-cache",
"validate": "npm run check:no-hex-colors && npm run lint:css && npm run test:install && npm test && npm run pack:dry",
"prepublishOnly": "npm run check:no-hex-colors && npm run lint:css && npm run pack:dry",

"bundle": "node ./scripts/build.mjs bundle",
"minify": "node ./scripts/build.mjs minify",
"build": "node ./scripts/build.mjs"
"build": "node ./scripts/build.mjs",

"test": "playwright test --config=./playwright.config.mjs",
"test:chromium": "playwright test --config=./playwright.config.mjs --project=chromium",
"test:install": "playwright install --with-deps chromium firefox webkit",
"test:install:chromium": "playwright install chromium --with-deps --only-shell",

"validate:publish": "npm run check:no-hex-colors && npm run lint:css && npm run build && npm run pack:dry",
"validate:ci": "npm run validate:publish",
"validate:browsers": "npm run validate:publish && npm run test:install:chromium && npm run test:chromium",
"validate:full": "npm run validate:publish && npm run test:install && npm test",
"validate": "npm run validate:ci",

"prepublishOnly": "npm run validate:publish"
},
"devDependencies": {
"@playwright/test": "^1.57.0",
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.