mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 04:32:01 +03:00
4294b5e7ba
swc_bundler: - Bundler rework. (denoland/deno#6802) - Reexports are not transitive. (denoland/deno#8246) - Dependencies of module with circular dependency. (denoland/deno#8302) - Order of injection between import vs export. (denoland/deno#8302) - `export *` in wrapped modules. (denoland/deno#8308, denoland/deno#8399) - `export { a as b }` in wrapped modules. - Fix denoland/deno#8314. - Fix denoland/deno#8325. - Fix denoland/deno#8344. - Make deno test verify exported names. - Handle `export * from './foo'`. swc_ecma_parser: - Don't panic on private name in interface (Closes #1211) swc_ecma_transforms: - dce: Prevent infinite loop - Faster constant propagation pass.
81 lines
2.7 KiB
YAML
81 lines
2.7 KiB
YAML
name: Integration tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
CI: "1"
|
|
|
|
jobs:
|
|
integration-test:
|
|
name: test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2-beta
|
|
with:
|
|
node-version: "12"
|
|
|
|
- name: Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/
|
|
**/target/
|
|
key: ${{ runner.os }}-cargo-integration
|
|
|
|
- name: Set platform name
|
|
run: |
|
|
export NODE_PLATFORM_NAME=$(node -e "console.log(require('os').platform())")
|
|
echo "name=PLATFORM_NAME::$NODE_PLATFORM_NAME" >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- name: Prepare
|
|
run: |
|
|
npm config set prefix ~/npm
|
|
npm i
|
|
export PATH="$PATH:$HOME/npm/bin"
|
|
|
|
npm run build:dev
|
|
npm i -g @swc/cli
|
|
npm link
|
|
|
|
- name: (swc) three.js
|
|
run: |
|
|
export PATH="$PATH:$HOME/npm/bin"
|
|
mkdir -p integration-tests/three-js
|
|
npm i -g qunit failonlyreporter
|
|
|
|
# Download three.js
|
|
git clone --depth 1 https://github.com/mrdoob/three.js.git -b r117 integration-tests/three-js/repo
|
|
|
|
swc --sync integration-tests/three-js/repo/ -d integration-tests/three-js/build/
|
|
# swc integration-tests/three-js/repo/src/ -d integration-tests/three-js/repo/build/
|
|
# swc integration-tests/three-js/repo/test/unit/**/*.js -d integration-tests/three-js/repo/test/unit/build/
|
|
|
|
(cd integration-tests/three-js/build/test && qunit -r failonlyreporter unit/three.source.unit.js)
|
|
|
|
# terser: contains with statement in test
|
|
# Rome.js: I forgot the cause, but it didn't work.
|
|
# jQuery: browser only (window.document is required)
|
|
- name: (swc) redux
|
|
run: |
|
|
export PATH="$PATH:$HOME/npm/bin"
|
|
mkdir -p integration-tests/redux
|
|
npm i -g qunit failonlyreporter
|
|
|
|
# Download
|
|
git clone --depth 1 https://github.com/reduxjs/redux.git integration-tests/redux/repo
|
|
swc --sync integration-tests/redux/repo/src/ -d integration-tests/redux/repo/lib/
|
|
echo "module.exports=require('./index')" > integration-tests/redux/repo/lib/redux.js
|
|
swc --sync integration-tests/redux/repo/src/ -d integration-tests/redux/repo/test/
|
|
swc --sync integration-tests/redux/repo/test/ -d integration-tests/redux/repo/test/
|
|
|
|
(cd integration-tests/redux/repo && npm i)
|
|
(cd integration-tests/redux/repo && npx jest '.*.js' --modulePathIgnorePatterns 'typescript')
|
|
- name: (spack) example react app
|
|
run: |
|
|
export PATH="$PATH:$HOME/npm/bin"
|
|
(cd spack/integration-tests/react && npm i && npx spack)
|