Skip to content

Commit 9447275

Browse files
committed
build: update the release workflow to run unit and e2e tests and add more inputs
1 parent 33cc143 commit 9447275

File tree

1 file changed

+45
-4
lines changed

1 file changed

+45
-4
lines changed

.github/workflows/release.yml

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,71 @@
11
name: Release packages (Work in Progress, a dry run only)
2+
run-name: "Create ${{ inputs.type }} release from ${{ inputs.release_ref }} by ${{ github.actor }}"
23

34
on:
45
workflow_dispatch:
56
inputs:
7+
release_ref:
8+
description: Upstream git ref to create the release from
9+
required: true
10+
type: string
11+
type:
12+
description: Release type
13+
required: true
14+
type: choice
15+
options:
16+
- snapshot
17+
- official
618
workspaces:
719
description: A comma-separated list of workspaces to release
820
required: false
921
type: string
22+
dry_run:
23+
description: Dry run (do not publish the packages)
24+
required: true
25+
type: boolean
1026

1127
#permissions:
1228
# id-token: write # Required for OIDC
1329
# contents: read
1430

1531
jobs:
16-
checks:
17-
name: Checks
32+
lint_and_unit_tests:
33+
name: Run lint and unit tests
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
ref: ${{ inputs.release_ref }}
39+
persist-credentials: false
40+
- uses: actions/setup-node@v6
41+
with:
42+
node-version-file: .nvmrc
43+
cache: yarn
44+
- name: Install dependencies
45+
run: yarn install --immutable
46+
- name: Build local packages
47+
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run build
48+
# TODO: Uncomment when code formatting is fixed in eui-theme-common and eui-theme-borealis
49+
# This is prepared in the upstream/build/gh-release-action branch
50+
# - name: Lint
51+
# run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run lint
52+
- name: Unit tests
53+
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run test-unit
54+
cypress_tests:
55+
name: Run cypress tests
1856
runs-on: ubuntu-latest
1957
steps:
2058
- uses: actions/checkout@v4
2159
with:
60+
ref: ${{ inputs.release_ref }}
2261
persist-credentials: false
2362
- uses: actions/setup-node@v6
2463
with:
2564
node-version-file: .nvmrc
2665
cache: yarn
2766
- name: Install dependencies
2867
run: yarn install --immutable
29-
- name: Run tests
30-
run: yarn workspaces foreach -A run test-ci
68+
- name: Build local packages
69+
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run build
70+
- name: Cypress tests
71+
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run test-cypress

0 commit comments

Comments
 (0)