swc/.github/workflows/cargo.yml
강동윤 9879fa59c8
bundler: fix bugs (#1105)
swc_bundler:
 - Correct lca for circular dependencies.
 - Handle namespaced imports. (#1109)
 - Handle namespaced reexports. (#1110)
 - Handle shorthand properly. (#1111)
 - Implement `import.meta` (#1115)
 - Handle reexport mixed with imports correctly. (#1116)
 - Handle export default decls in computed-key modules. 
 - Remove all export * from. output. (#1118)
 - Handle export of class or function declaration in a computed module properly. (#1119)


swc_ecma_transforms:
 - Do not rename class members. (#1117)
2020-10-02 11:07:40 +09:00

100 lines
2.5 KiB
YAML

name: Cargo
on: [push, pull_request]
#on:
# push:
# # Ignore commits created by bors
# branches-ignore:
# - 'staging'
# - 'trying'
# pull_request:
# branches-ignore:
# - 'staging'
# - 'trying'
env:
CARGO_INCREMENTAL: 0
# To make spack tests reliable
RAYON_NUM_THREADS: 1
CI: "1"
jobs:
fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rustfmt
run: rustup component add rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: "12"
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Install node dependencies
run: |
npm config set prefix ~/npm
npm i browserslist regenerator-runtime sourcemap-validator progress
npm i -g jest
- name: Install llvm
if: matrix.os == 'windows-latest'
run: choco install -y llvm
- name: Set llvm path
if: matrix.os == 'windows-latest'
uses: allenevans/set-env@v1.0.0
with:
LIBCLANG_PATH: 'C:\\Program Files\\LLVM\\bin'
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/
**/target/
key: ${{ runner.os }}-cargo-test
# Ensure that all components all compilable.
- name: Run cargo check for all targets
run: cargo check --color always --all --all-targets
- name: Download typescript parser test suite
run: |
git clone --depth 1 https://github.com/swc-project/ts-parser-test-ref.git ecmascript/parser/tests/typescript/tsc
- name: Run fast cargo test
run: |
export PATH="$PATH:$HOME/npm/bin"
EXEC=0 cargo test --color always --all --exclude node --exclude wasm
- name: Run slow cargo test
run: |
export PATH="$PATH:$HOME/npm/bin"
cargo test --color always -p swc_ecma_transforms
#
deploy-docs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs:
- test
steps:
- uses: actions/checkout@v2
- name: Create rustdoc
run: cargo doc