mirror of
https://github.com/swc-project/swc.git
synced 2024-11-29 22:51:38 +03:00
f500e9528c
- Allow rest in non-last elements in tuple type - Allow labelled ts type element in tuple type - More operators
78 lines
1.9 KiB
YAML
78 lines
1.9 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
|
|
CI: "1"
|
|
SKIP_SWC_BINARY_DOWNLOAD_FOR_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
|
|
|
|
# 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 cargo test
|
|
run: |
|
|
export PATH="$PATH:$HOME/npm/bin"
|
|
cargo test --color always --all --exclude swc_ecma_parser
|
|
|
|
#
|
|
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
|