2020-01-04 07:33:25 +03:00
|
|
|
name: Cargo
|
|
|
|
|
2020-02-18 06:27:13 +03:00
|
|
|
on: [push, pull_request]
|
2020-02-18 05:36:56 +03:00
|
|
|
#on:
|
|
|
|
# push:
|
|
|
|
# # Ignore commits created by bors
|
|
|
|
# branches-ignore:
|
|
|
|
# - 'staging'
|
|
|
|
# - 'trying'
|
|
|
|
# pull_request:
|
|
|
|
# branches-ignore:
|
|
|
|
# - 'staging'
|
|
|
|
# - 'trying'
|
2020-01-04 07:33:25 +03:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
2021-03-22 13:42:42 +03:00
|
|
|
RUST_LOG: "debug"
|
2022-02-11 11:43:48 +03:00
|
|
|
DIFF: 0
|
2022-02-27 09:25:05 +03:00
|
|
|
# https://github.com/swc-project/swc/pull/3742
|
|
|
|
RUST_MIN_STACK: 4194304
|
2022-06-16 10:23:02 +03:00
|
|
|
CI: 1
|
2020-01-04 07:33:25 +03:00
|
|
|
|
|
|
|
jobs:
|
2021-03-26 18:45:51 +03:00
|
|
|
check-license:
|
|
|
|
name: Check license
|
|
|
|
runs-on: ubuntu-latest
|
2022-05-08 11:55:51 +03:00
|
|
|
if: >-
|
|
|
|
${{ !contains(github.event.head_commit.message, 'chore: ') }}
|
2021-03-26 18:45:51 +03:00
|
|
|
steps:
|
2022-05-04 13:04:48 +03:00
|
|
|
- uses: actions/checkout@v3
|
2021-03-26 18:45:51 +03:00
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
|
2022-03-15 17:17:03 +03:00
|
|
|
- name: Install cargo-deny
|
|
|
|
uses: baptiste0928/cargo-install@v1.1.0
|
|
|
|
with:
|
|
|
|
crate: cargo-deny
|
|
|
|
version: "0.11.3"
|
2021-03-26 18:45:51 +03:00
|
|
|
|
|
|
|
- name: Check licenses
|
|
|
|
run: |
|
|
|
|
cargo deny check
|
|
|
|
|
2021-03-22 13:42:42 +03:00
|
|
|
check:
|
|
|
|
name: Check
|
|
|
|
runs-on: ${{ matrix.os }}
|
2022-05-08 11:55:51 +03:00
|
|
|
if: >-
|
|
|
|
${{ !contains(github.event.head_commit.message, 'chore: ') }}
|
2021-03-22 13:42:42 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
2022-07-25 07:48:01 +03:00
|
|
|
- macos-latest
|
2021-05-10 10:18:31 +03:00
|
|
|
- windows-latest
|
2021-01-22 12:39:57 +03:00
|
|
|
steps:
|
2022-05-04 13:04:48 +03:00
|
|
|
- uses: actions/checkout@v3
|
2021-12-27 11:32:47 +03:00
|
|
|
with:
|
|
|
|
submodules: true
|
2021-11-10 12:08:45 +03:00
|
|
|
|
2021-03-25 19:22:09 +03:00
|
|
|
# We explicitly do this to cache properly.
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2022-08-01 07:23:26 +03:00
|
|
|
toolchain: 1.60
|
2021-03-25 19:22:09 +03:00
|
|
|
|
2022-05-04 13:04:48 +03:00
|
|
|
- uses: actions/setup-node@v3
|
2022-03-11 15:49:53 +03:00
|
|
|
with:
|
|
|
|
node-version: "16"
|
|
|
|
cache: "yarn"
|
|
|
|
|
|
|
|
- name: Install node dependencies
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
yarn
|
|
|
|
|
2021-03-22 13:42:42 +03:00
|
|
|
# Ensure that all components are compilable.
|
2021-01-22 12:39:57 +03:00
|
|
|
- name: Run cargo check for all targets
|
|
|
|
run: cargo check --color always --all --all-targets
|
2020-05-22 14:36:39 +03:00
|
|
|
test:
|
2022-02-14 15:13:25 +03:00
|
|
|
name: Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }}
|
|
|
|
runs-on: ${{ matrix.settings.os }}
|
2022-02-27 08:44:26 +03:00
|
|
|
if: >-
|
|
|
|
${{ !contains(github.event.head_commit.message, 'chore: ') }}
|
2021-01-22 12:39:57 +03:00
|
|
|
strategy:
|
2021-02-19 09:34:22 +03:00
|
|
|
fail-fast: false
|
2021-01-22 12:39:57 +03:00
|
|
|
matrix:
|
2022-02-14 15:13:25 +03:00
|
|
|
settings:
|
|
|
|
# Use scripts/github/create-matrix.sh to create this.
|
|
|
|
- crate: ast_node
|
|
|
|
os: ubuntu-latest
|
2022-02-22 12:03:40 +03:00
|
|
|
- crate: better_scoped_tls
|
|
|
|
os: ubuntu-latest
|
2022-04-15 16:47:44 +03:00
|
|
|
- crate: binding_core_node
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: binding_core_wasm
|
|
|
|
os: ubuntu-latest
|
2022-07-09 13:15:12 +03:00
|
|
|
- crate: dbg-swc
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: enum_kind
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: from_variant
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: jsdoc
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: node_macro_deps
|
|
|
|
os: ubuntu-latest
|
2022-02-22 12:03:40 +03:00
|
|
|
- crate: preset_env_base
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: string_enum
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
2022-07-13 09:39:08 +03:00
|
|
|
cargo hack check --feature-powerset --no-dev-deps --exclude-features debug --exclude-features plugin --exclude-features plugin_transform_schema_v1 --exclude-features plugin_transform_schema_vtest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_atoms
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_bundler
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
|
|
|
cargo hack check --feature-powerset --no-dev-deps
|
2022-03-16 01:45:40 +03:00
|
|
|
- crate: swc_cached
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_cli
|
|
|
|
os: ubuntu-latest
|
2022-03-17 09:31:20 +03:00
|
|
|
check: |
|
|
|
|
cargo check
|
|
|
|
cargo check --features plugin
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_cli
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_common
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
2022-07-13 09:39:08 +03:00
|
|
|
cargo hack check --feature-powerset --no-dev-deps --exclude-features plugin_transform_schema_vtest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_common
|
|
|
|
os: windows-latest
|
2022-05-09 08:38:27 +03:00
|
|
|
- crate: swc_config
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_config_macro
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_css
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_css_ast
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_css_codegen
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_css_codegen
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_css_codegen_macros
|
|
|
|
os: ubuntu-latest
|
2022-02-27 18:31:19 +03:00
|
|
|
- crate: swc_css_lints
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_css_minifier
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_css_parser
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_css_parser
|
|
|
|
os: windows-latest
|
2022-04-15 16:47:44 +03:00
|
|
|
- crate: swc_css_prefixer
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_css_utils
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_css_visit
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_ast
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
|
|
|
cargo hack check --feature-powerset --no-dev-deps
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_ecma_codegen
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_codegen
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_ecma_codegen_macros
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_dep_graph
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_ext_transforms
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_lints
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_loader
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
|
|
|
cargo hack check --feature-powerset --no-dev-deps
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_ecma_loader
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_ecma_minifier
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_parser
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_parser
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_ecma_preset_env
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_preset_env
|
|
|
|
os: windows-latest
|
2022-02-28 13:44:06 +03:00
|
|
|
- crate: swc_ecma_quote
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_quote_macros
|
|
|
|
os: ubuntu-latest
|
2022-07-09 13:15:12 +03:00
|
|
|
- crate: swc_ecma_testing
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_ecma_transforms
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
|
|
|
cargo hack check --feature-powerset --no-dev-deps
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_ecma_transforms_base
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
|
|
|
cargo hack check --feature-powerset --no-dev-deps
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_ecma_transforms_classes
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_transforms_compat
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
|
|
|
cargo hack check --feature-powerset --no-dev-deps
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_ecma_transforms_macros
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_transforms_module
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_transforms_module
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_ecma_transforms_optimization
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
|
|
|
cargo hack check --feature-powerset --no-dev-deps
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_ecma_transforms_proposal
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_transforms_react
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_transforms_testing
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_transforms_testing
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_ecma_transforms_typescript
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_ecma_utils
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
|
|
|
cargo hack check --feature-powerset --no-dev-deps
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_ecma_visit
|
|
|
|
os: ubuntu-latest
|
2022-07-09 13:15:12 +03:00
|
|
|
check: |
|
|
|
|
cargo hack check --feature-powerset --no-dev-deps
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_ecmascript
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_eq_ignore_macros
|
|
|
|
os: ubuntu-latest
|
2022-03-16 01:45:40 +03:00
|
|
|
- crate: swc_error_reporters
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_estree_ast
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_estree_compat
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_fast_graph
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_graph_analyzer
|
|
|
|
os: ubuntu-latest
|
2022-04-04 07:12:45 +03:00
|
|
|
- crate: swc_html
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_html_ast
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_html_codegen
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_html_codegen
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_html_codegen_macros
|
|
|
|
os: ubuntu-latest
|
2022-04-23 06:50:59 +03:00
|
|
|
- crate: swc_html_minifier
|
|
|
|
os: ubuntu-latest
|
2022-04-04 07:12:45 +03:00
|
|
|
- crate: swc_html_parser
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_html_parser
|
|
|
|
os: windows-latest
|
2022-07-09 13:15:12 +03:00
|
|
|
- crate: swc_html_utils
|
|
|
|
os: ubuntu-latest
|
2022-04-04 07:12:45 +03:00
|
|
|
- crate: swc_html_visit
|
|
|
|
os: ubuntu-latest
|
2022-08-01 06:56:12 +03:00
|
|
|
- crate: swc_xml
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_xml_ast
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_xml_codegen
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_xml_codegen
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_xml_codegen_macros
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_xml_parser
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_xml_parser
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_xml_visit
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_macros_common
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_node_base
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_node_bundler
|
|
|
|
os: ubuntu-latest
|
2022-02-24 09:06:03 +03:00
|
|
|
check: |
|
|
|
|
cargo check
|
|
|
|
cargo check --no-default-features --features swc_v2
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_node_bundler
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_node_comments
|
|
|
|
os: ubuntu-latest
|
2022-07-09 13:15:12 +03:00
|
|
|
- crate: swc_nodejs_common
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_plugin
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_plugin
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_plugin_macro
|
|
|
|
os: ubuntu-latest
|
2022-04-15 16:47:44 +03:00
|
|
|
- crate: swc_plugin_proxy
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_plugin_runner
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_plugin_runner
|
|
|
|
os: macos-latest
|
|
|
|
- crate: swc_plugin_runner
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_plugin_testing
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_plugin_testing
|
|
|
|
os: windows-latest
|
|
|
|
- crate: swc_timer
|
|
|
|
os: ubuntu-latest
|
2022-02-28 13:44:06 +03:00
|
|
|
- crate: swc_trace_macro
|
|
|
|
os: ubuntu-latest
|
2022-02-14 15:13:25 +03:00
|
|
|
- crate: swc_visit
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: swc_visit_macros
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: testing
|
|
|
|
os: ubuntu-latest
|
|
|
|
- crate: testing_macros
|
|
|
|
os: ubuntu-latest
|
2022-05-23 10:16:05 +03:00
|
|
|
|
2020-01-04 07:33:25 +03:00
|
|
|
steps:
|
2021-03-22 13:42:42 +03:00
|
|
|
- name: Handle line endings
|
|
|
|
shell: bash
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
|
|
|
git config --system core.autocrlf false
|
|
|
|
git config --system core.eol lf
|
|
|
|
|
2022-05-04 13:04:48 +03:00
|
|
|
- uses: actions/checkout@v3
|
2021-12-27 11:32:47 +03:00
|
|
|
with:
|
|
|
|
submodules: true
|
2020-01-04 07:33:25 +03:00
|
|
|
|
2021-06-23 13:50:27 +03:00
|
|
|
# Source map format
|
2022-05-04 13:04:48 +03:00
|
|
|
- uses: actions/setup-node@v3
|
2021-06-23 13:50:27 +03:00
|
|
|
with:
|
2021-07-30 04:11:27 +03:00
|
|
|
node-version: "16"
|
2021-12-12 10:16:20 +03:00
|
|
|
cache: "yarn"
|
2021-06-23 13:50:27 +03:00
|
|
|
|
2021-03-25 19:22:09 +03:00
|
|
|
# We explicitly do this to cache properly.
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2022-01-15 07:40:00 +03:00
|
|
|
target: wasm32-wasi
|
2021-03-25 19:22:09 +03:00
|
|
|
|
2021-07-13 15:41:40 +03:00
|
|
|
- uses: denoland/setup-deno@v1
|
2022-02-14 15:13:25 +03:00
|
|
|
if: matrix.settings.crate == 'swc_bundler'
|
2021-04-14 17:00:33 +03:00
|
|
|
with:
|
|
|
|
deno-version: v1.x
|
|
|
|
|
2020-01-04 07:33:25 +03:00
|
|
|
- name: Install node dependencies
|
2021-03-22 13:42:42 +03:00
|
|
|
shell: bash
|
2020-01-04 07:33:25 +03:00
|
|
|
run: |
|
2021-08-02 18:49:34 +03:00
|
|
|
yarn
|
2022-04-25 14:44:50 +03:00
|
|
|
# I don't want to think deeply about this
|
|
|
|
yarn global add jest@27 mocha || \
|
|
|
|
yarn global add jest@27 mocha || \
|
|
|
|
yarn global add jest@27 mocha || \
|
|
|
|
yarn global add jest@27 mocha || \
|
|
|
|
yarn global add jest@27 mocha || \
|
|
|
|
yarn global add jest@27 mocha || \
|
|
|
|
yarn global add jest@27 mocha || \
|
|
|
|
yarn global add jest@27 mocha || true
|
2021-03-22 13:42:42 +03:00
|
|
|
|
|
|
|
- name: Configure path (windows)
|
|
|
|
shell: bash
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
run: |
|
2022-04-25 14:44:50 +03:00
|
|
|
echo $(yarn global bin) >> $GITHUB_PATH
|
2021-03-22 13:42:42 +03:00
|
|
|
|
|
|
|
- name: Verify dependencies
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-07-13 09:39:08 +03:00
|
|
|
jest --version && mocha --version
|
2020-01-04 07:33:25 +03:00
|
|
|
|
2022-05-25 09:23:35 +03:00
|
|
|
- name: Configure execution cache
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir -p .swc-exec-cache
|
|
|
|
echo "SWC_ECMA_TESTING_CACHE_DIR=$(pwd)/.swc-exec-cache" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Cache execution results
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.swc-exec-cache
|
|
|
|
key: swc-exec-cache-${{ runner.os }}-${{ matrix.settings.crate }}-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
restore-keys: |
|
2022-05-26 10:37:34 +03:00
|
|
|
swc-exec-cache-${{ matrix.settings.crate }}-${{ runner.os }}
|
2022-05-25 09:23:35 +03:00
|
|
|
|
2021-01-05 08:29:52 +03:00
|
|
|
- name: Run cargo test
|
2022-08-05 10:37:42 +03:00
|
|
|
if: matrix.settings.crate != 'swc_plugin_runner' && matrix.settings.crate != 'swc_ecma_minifier' && matrix.settings.crate != 'swc_core' && matrix.settings.crate != 'swc_ecma_quote'
|
2020-01-04 07:33:25 +03:00
|
|
|
run: |
|
2022-02-14 15:13:25 +03:00
|
|
|
cargo test --color always -p ${{ matrix.settings.crate }}
|
2021-03-17 09:24:35 +03:00
|
|
|
|
2022-08-05 10:37:42 +03:00
|
|
|
- name: Run cargo test (core)
|
|
|
|
if: matrix.settings.crate == 'swc_core'
|
|
|
|
run: |
|
|
|
|
cargo test --color always -p swc_core --features quote --features common --features utils
|
|
|
|
|
2022-07-11 04:44:00 +03:00
|
|
|
- name: Run cargo test (plugin)
|
|
|
|
if: matrix.settings.crate == 'swc_plugin_runner'
|
|
|
|
run: |
|
2022-07-13 09:39:08 +03:00
|
|
|
cargo test --color always -p swc_plugin_runner --features plugin_transform_schema_v1
|
2022-07-11 04:44:00 +03:00
|
|
|
|
2022-08-01 08:16:51 +03:00
|
|
|
- name: Run cargo test (swc_ecma_minifier)
|
|
|
|
if: matrix.settings.crate == 'swc_ecma_minifier'
|
|
|
|
run: |
|
|
|
|
cargo test --color always -p swc_ecma_minifier --features concurrent
|
|
|
|
|
2022-04-10 12:33:18 +03:00
|
|
|
- name: Run cargo test (all features)
|
2022-05-25 09:23:35 +03:00
|
|
|
if: matrix.settings.crate == 'swc_ecma_parser' || matrix.settings.crate == 'swc_ecma_loader' || matrix.settings.crate == 'swc_ecma_transforms'
|
2021-12-13 05:39:17 +03:00
|
|
|
run: |
|
2022-04-10 12:33:18 +03:00
|
|
|
cargo test --color always -p ${{ matrix.settings.crate }} --all-features
|
2021-12-13 05:39:17 +03:00
|
|
|
|
2022-06-13 14:15:18 +03:00
|
|
|
- name: Run cargo test (concurrent)
|
2022-08-11 05:04:58 +03:00
|
|
|
if: runner.os == 'Linux' && matrix.settings.crate != 'swc_ecma_minifier'
|
2022-06-13 14:15:18 +03:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
./scripts/ci/test-concurrent.sh ${{ matrix.settings.crate }}
|
|
|
|
|
|
|
|
- name: Run cargo test (swc, concurrent)
|
|
|
|
shell: bash
|
|
|
|
if: matrix.settings.crate == 'swc' && runner.os == 'Linux'
|
|
|
|
run: |
|
|
|
|
cargo test --color always -p swc --features concurrent
|
|
|
|
|
2022-02-24 09:06:03 +03:00
|
|
|
- name: Install cargo-hack
|
|
|
|
uses: baptiste0928/cargo-install@v1.1.0
|
|
|
|
if: matrix.settings.os == 'ubuntu-latest' && matrix.settings.check
|
|
|
|
with:
|
|
|
|
crate: cargo-hack
|
|
|
|
version: "0.5.7"
|
|
|
|
|
|
|
|
- name: Check compilation
|
|
|
|
if: matrix.settings.check
|
|
|
|
working-directory: "crates/${{ matrix.settings.crate }}"
|
|
|
|
run: "${{ matrix.settings.check }}"
|