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

chore(build): build the CLI module with esbuild #4187

Merged
merged 1 commit into from
Oct 18, 2023
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
41 changes: 41 additions & 0 deletions .github/workflows/build-esbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build Stencil with Esbuild

on:
workflow_call:
# Make this a reusable workflow, no value needed
# https://docs.github.com/en/actions/using-workflows/reusing-workflows

jobs:
build_core:
name: Core
runs-on: 'ubuntu-22.04'
steps:
- name: Checkout Code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
# the pull_request_target event will consider the HEAD of `main` to be the SHA to use.
# attempt to use the SHA associated with a pull request and fallback to HEAD of `main`
ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.number) || '' }}
persist-credentials: false

- name: Get Core Dependencies
uses: ./.github/workflows/actions/get-core-dependencies

- name: Core Build
run: npm run build.esbuild -- --ci
shell: bash

- name: Validate Build
run: npm run test.dist
shell: bash

- name: Validate Testing
run: npm run test.testing
shell: bash

- name: Upload Build Artifacts
uses: ./.github/workflows/actions/upload-archive
with:
name: stencil-core-esbuild
output: stencil-core-build.zip
paths: build cli compiler dev-server internal mock-doc scripts/build screenshot sys testing
53 changes: 53 additions & 0 deletions .github/workflows/main-esbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: esbuild CI

on:
push:
branches:
- 'main'
pull_request:
branches:
- '**'

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

jobs:
build_core:
name: Build
uses: ./.github/workflows/build-esbuild.yml

analysis_tests:
name: Analysis Tests (Esbuild)
needs: [build_core]
uses: ./.github/workflows/test-analysis.yml
with:
build_name: stencil-core-esbuild

bundler_tests:
name: Bundler Tests (Esbuild)
needs: [build_core]
uses: ./.github/workflows/test-bundlers.yml
with:
build_name: stencil-core-esbuild

component_starter_tests:
name: Component Starter Smoke Test (Esbuild)
needs: [build_core]
uses: ./.github/workflows/test-component-starter.yml
with:
build_name: stencil-core-esbuild

e2e_tests:
name: E2E Tests (Esbuild)
needs: [build_core]
uses: ./.github/workflows/test-e2e.yml
with:
build_name: stencil-core-esbuild

unit_tests:
name: Unit Tests (Esbuild)
needs: [build_core]
uses: ./.github/workflows/test-unit.yml
with:
build_name: stencil-core-esbuild
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,33 @@ jobs:
name: Analysis Tests
needs: [build_core]
uses: ./.github/workflows/test-analysis.yml
with:
build_name: stencil-core

bundler_tests:
name: Bundler Tests
needs: [build_core]
uses: ./.github/workflows/test-bundlers.yml
with:
build_name: stencil-core

component_starter_tests:
name: Component Starter Smoke Test
needs: [build_core]
uses: ./.github/workflows/test-component-starter.yml
with:
build_name: stencil-core

e2e_tests:
name: E2E Tests
needs: [build_core]
uses: ./.github/workflows/test-e2e.yml
with:
build_name: stencil-core

unit_tests:
name: Unit Tests
needs: [build_core]
uses: ./.github/workflows/test-unit.yml
with:
build_name: stencil-core
7 changes: 6 additions & 1 deletion .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
workflow_call:
# Make this a reusable workflow, no value needed
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
inputs:
build_name:
description: Name for the build, used to resolve the correct build artifact
required: true
type: string

jobs:
analysis_test:
Expand All @@ -30,7 +35,7 @@ jobs:
- name: Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: stencil-core
name: ${{ inputs.build_name }}
path: .
filename: stencil-core-build.zip

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-bundlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
workflow_call:
# Make this a reusable workflow, no value needed
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
inputs:
build_name:
description: Name for the build, used to resolve the correct build artifact
required: true
type: string

jobs:
bundler_tests:
Expand All @@ -19,7 +24,7 @@ jobs:
- name: Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: stencil-core
name: ${{ inputs.build_name }}
path: .
filename: stencil-core-build.zip

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-component-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
workflow_call:
# Make this a reusable workflow, no value needed
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
inputs:
build_name:
description: Name for the build, used to resolve the correct build artifact
required: true
type: string

jobs:
analysis_test:
Expand Down Expand Up @@ -39,7 +44,7 @@ jobs:
- name: Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: stencil-core
name: ${{ inputs.build_name }}
path: ./stencil-pack-destination
filename: stencil-core-build.zip

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
workflow_call:
# Make this a reusable workflow, no value needed
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
inputs:
build_name:
description: Name for the build, used to resolve the correct build artifact
required: true
type: string

jobs:
e2e_test:
Expand All @@ -30,7 +35,7 @@ jobs:
- name: Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: stencil-core
name: ${{ inputs.build_name }}
path: .
filename: stencil-core-build.zip

Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
workflow_call:
# Make this a reusable workflow, no value needed
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
inputs:
build_name:
description: Name for the build, used to resolve the correct build artifact
required: true
type: string

jobs:
unit_test:
Expand Down Expand Up @@ -31,7 +36,7 @@ jobs:
- name: Download Build Archive
uses: ./.github/workflows/actions/download-archive
with:
name: stencil-core
name: ${{ inputs.build_name }}
path: .
filename: stencil-core-build.zip

Expand Down
Loading