Merge remote-tracking branch 'webkit/main' into 2024-11-26_github_actions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..f4e4d98
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,59 @@
+name: CI
+
+on:
+ push:
+ branches: ["main"]
+ pull_request:
+ branches: ["main"]
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+jobs:
+ linters:
+ name: Linters
+ runs-on: macos-latest
+ steps:
+ - name: Checkout Branch
+ uses: actions/checkout@v3
+ - name: Setup Node
+ uses: actions/setup-node@v3
+ with:
+ node-version: 18.13.0
+ - name: Install
+ run: npm install
+ - name: Run linters
+ run: npm run format
+ - name: Check if anything changed
+ run: |
+ git_status="`LC_ALL=C git status --porcelain --ignore-submodules -unormal 2>&1`"
+ if [ -n "$git_status" ]; then
+ printf "Some file(s) changed as the result of formatting, this means that you need to run the formatter on your patch.\n"
+ printf "Here is what changed:\n"
+ printf -- "$git_status\n\n"
+ printf "And here is the diff:\n"
+ git diff -U8
+ exit 1
+ fi
+ build:
+ name: Build
+ runs-on: macos-latest
+ strategy:
+ matrix:
+ browser: [chrome, firefox, safari]
+ steps:
+ - name: Install Firefox
+ if: ${{ matrix.browser == 'firefox' }}
+ run: brew install --cask firefox
+ - name: Checkout Branch
+ uses: actions/checkout@v3
+ - name: Setup Node
+ uses: actions/setup-node@v3
+ with:
+ node-version: 18.13.0
+ - name: Install
+ run: npm install
+ - name: Run tests
+ run: |
+ echo "Running in $BROWSER"
+ npm run test:${{ matrix.browser }}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..62c7db6
--- /dev/null
+++ b/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "jetstream",
+ "version": "3.0.0-alpha",
+ "description": "An open source repository for the JetStream benchmark.",
+ "engines": {
+ "node": ">=18.13.0",
+ "npm": ">=8.19.3"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/WebKit/JetStream.git"
+ },
+ "bugs": {
+ "url": "https://github.com/WebKit/JetStream/issues"
+ },
+ "license": "SEE LICENSE IN LICENSE",
+ "scripts": {
+ "dev": "http-server ./ -c-1 --cors",
+ "server": "http-server ./ --cors",
+ "lint:check": "eslint **/*.{js,mjs,jsx,ts,tsx}",
+ "lint:fix": "eslint \"**/*.{js,mjs,jsx,ts,tsx}\" --fix",
+ "pretty:check": "prettier --check ./",
+ "pretty:fix": "prettier --write ./",
+ "format": "npm run pretty:fix && npm run lint:fix"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.21.3",
+ "@babel/eslint-parser": "^7.21.3",
+ "@babel/plugin-proposal-decorators": "^7.21.0",
+ "command-line-args": "^5.2.1",
+ "command-line-usage": "^6.1.3",
+ "eslint": "^8.38.0",
+ "http-server": "^14.1.1",
+ "prettier": "^2.8.3",
+ "selenium-webdriver": "^4.8.0"
+ }
+}