Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI fixup: Node 22, replace uvu with node:test, upgrade lockfile format #432

Merged
merged 2 commits into from
Mar 19, 2025
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
16 changes: 15 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,18 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
groups:
dev-dependencies:
patterns:
- "*"
dependency-type: "development"
prod-dependencies:
patterns:
- "*"
dependency-type: "production"
ignore:
- dependency-name: "alpinejs"
- dependency-name: "tailwindcss"
- dependency-name: "rollup"
- dependency-name: "edge.js"
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ on:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]
node-version: [22.x]

env:
CI: true

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
Expand All @@ -35,7 +35,7 @@ jobs:
- name: build
run: npm run package
- name: Archive production artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: alpine-devtools
path: dist
Expand All @@ -44,7 +44,7 @@ jobs:
- name: check formatting
run: npm run format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply formatting changes
# see https://github.com/bahmutov/cypress-gh-action-split-install
Expand All @@ -53,13 +53,13 @@ jobs:
# see https://github.com/actions/cache
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: cypress-cache-v1-${{ runner.os }}-${{ hashFiles('**/package.json') }}
# install Cypress binary
- run: npx cypress install && npx cypress cache list
- uses: cypress-io/github-action@v2
- uses: cypress-io/github-action@v6
with:
start: npm run start:ci
command: npm run cy:run
Expand Down
2 changes: 0 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Note that when using the simulator all Chrome/Firefox devtools/Extension APIs ar

We have 2 levels of tests in the project:

- unit tests in [./tests](./tests), written and run with [uvu](https://github.com/lukeed/uvu)
- unit tests in [./tests](./tests), written and run with `node:test`
- The command to run them is `npm test`.
- E2E tests that run against the devtools simulator, in [./cypress](./cypress), using [Cypress](https://cypress.io).
- The command to run Cypress tests is `npm run cy:run`
Expand Down
18 changes: 18 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
video: false,
fixturesFolder: false,
chromeWebSecurity: false,
retries: {
runMode: 1,
},

e2e: {
experimentalRunAllSpecs: true,
// TODO: when reworking the tests, we should do 1 test -> multiple assertions
testIsolation: false,
setupNodeEvents(on, config) {},
baseUrl: 'http://localhost:8080',
},
})
10 changes: 0 additions & 10 deletions cypress.json

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/integration/load.js → cypress/e2e/load.cy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { AlpineVersion } = require('../support/index')
const { AlpineVersion } = require('../support/e2e')
it('should load devtools', () => {
cy.visit('/')
// panel pre-Alpine loaded state
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { AlpineVersion } = require('../support/index')
const { AlpineVersion } = require('../support/e2e')

function overrideAlpineVersion(win, versionToOverride = undefined) {
const postMessage = win.postMessage.bind(win)
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import './commands'

import { packages } from '../../package-lock.json'
export const AlpineVersion = packages['node_modules/alpinejs'].version
4 changes: 0 additions & 4 deletions cypress/support/index.js

This file was deleted.

Loading