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
49 changes: 45 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,71 @@
name: Release packages (Work in Progress, a dry run only)
run-name: "Create ${{ inputs.type }} release from ${{ inputs.release_ref }} by ${{ github.actor }}"

on:
workflow_dispatch:
inputs:
release_ref:
description: Upstream git ref to create the release from
required: true
type: string
type:
description: Release type
required: true
type: choice
options:
- snapshot
- official
workspaces:
description: A comma-separated list of workspaces to release
required: false
type: string
dry_run:
description: Dry run (do not publish the packages)
required: true
type: boolean

#permissions:
# id-token: write # Required for OIDC
# contents: read

jobs:
checks:
name: Checks
lint_and_unit_tests:
name: Run lint and unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.release_ref }}
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Build local packages
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run build
# TODO: Uncomment when code formatting is fixed in eui-theme-common and eui-theme-borealis
# This is prepared in the upstream/build/gh-release-action branch
# - name: Lint
# run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run lint
- name: Unit tests
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run test-unit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so pretty... 🥹

cypress_tests:
name: Run cypress tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.release_ref }}
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Run tests
run: yarn workspaces foreach -A run test-ci
- name: Build local packages
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run build
- name: Cypress tests
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run test-cypress
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"scripts": {
"pre-push": "yarn --cwd packages/eui pre-push",
"preinstall": "printf $'\\x1b[K\\x1b[37;41mWarning: EUI has recently migrated to a monorepo structure. Please run EUI scripts like \\x1b[1;4myarn start\\x1b[0m\\x1b[37;41m or \\x1b[1;4myarn build\\x1b[0m\\x1b[37;41m from the \\x1b[1;4mpackages/eui\\x1b[0m\\x1b[37;41m directory instead!\\n\\nIf this is the first time you\\'re running EUI after the monorepo migration, please run this first from the root repository\\'s directory to clean up your local environment:\\n \\x1b[1;4mrm -rf node_modules .cache-loader dist es lib optimize test-env types .eslintcache .loki reports docs .nyc_output eui.d.ts && yarn\\x1b[0m\\x1b[37;41m\\n\\nInstall process will continue in 10 seconds...\\x1b[0m'; sleep 10",
"start": "printf $'\\x1b[K\\x1b[37;41mPlease run this script from the \\x1b[1;4mpackages/eui\\x1b[0m\\x1b[37;41m directory instead\\x1b[0m\\n'; exit 1",
"build": "printf $'\\x1b[K\\x1b[37;41mPlease run this script from the \\x1b[1;4mpackages/eui\\x1b[0m\\x1b[37;41m directory instead\\x1b[0m\\n'; exit 1",
"release": "node scripts/release",
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"typescript": "^5.8.3"
},
"scripts": {
"test": "jest src",
"test": "yarn test-unit",
"test-unit": "jest src",
"build": "yarn build:clean && yarn build:compile && yarn build:compile:esm && yarn build:types",
"build:clean": "rimraf lib/",
"build:compile:esm": "tsc --project ./tsconfig.esm.json",
Expand Down
3 changes: 2 additions & 1 deletion packages/eui-theme-borealis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"lint": "yarn tsc --noEmit && yarn lint-es && yarn lint-sass",
"lint-es": "eslint --cache src/**/*.ts --max-warnings 0",
"lint-sass": "yarn stylelint \"**/*.scss\" --quiet-deprecation-warnings",
"test": "jest ./src",
"test": "yarn test-unit",
"test-unit": "jest ./src --passWithNoTests",
"pre-push": "yarn build:workspaces && yarn lint && yarn test"
},
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion packages/eui-theme-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"lint": "yarn tsc --noEmit && yarn lint-es && yarn lint-sass",
"lint-es": "eslint --cache src/**/*.ts --max-warnings 0",
"lint-sass": "yarn stylelint \"**/*.scss\" --quiet-deprecation-warnings",
"test": "jest ./src",
"test": "yarn test-unit",
"test-unit": "jest ./src --passWithNoTests",
"pre-push": "yarn lint && yarn test"
},
"repository": {
Expand Down
1 change: 0 additions & 1 deletion packages/release-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"description": "",
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc"
},
"repository": {
Expand Down