fix(router): allow empty route.path for correct catchAll ranking #1503
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
on: | |
push: | |
branches: | |
- '**' | |
- '!release/swc-**' | |
pull_request: | |
branches: | |
- main | |
types: [opened, synchronize, reopened] | |
name: CI | |
env: | |
CI: true | |
RUST_TOOLCHAIN: nightly-2022-02-23 | |
SHUVI_SKIP_BOOTSTRAP: false | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
# - windows-latest | |
name: Build and Test on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: ^8.9.2 | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
cache: 'pnpm' | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
profile: minimal | |
- name: Cache cargo registry | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry | |
key: stable-ubuntu-latest-cargo-registry | |
- name: Cache cargo index | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/git | |
key: stable-ubuntu-latest-cargo-index | |
# We use week in the turbo cache key to keep the cache from infinitely growing | |
- id: get-week | |
run: echo ::set-output name=WEEK::$(date +%U) | |
- name: Turbo Cache | |
id: turbo-cache | |
uses: actions/cache@v3 | |
with: | |
path: .turbo | |
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}-${{ github.sha }} | |
restore-keys: | | |
turbo-${{ github.job }}-${{ github.ref_name }}-${{ steps.get-week.outputs.WEEK }}- | |
turbo-${{ github.job }}-main-${{ steps.get-week.outputs.WEEK }}- | |
turbo-${{ github.job }}- | |
# We use restore-key to pick latest cache. | |
# We will not get exact match, but doc says | |
# "If there are multiple partial matches for a restore key, the action returns the most recently created cache." | |
# So we get latest cache | |
- name: Cache built files | |
uses: actions/cache@v3 | |
with: | |
path: ./packages/compiler-swc/target | |
key: compiler-swc-cargo-cache-dev-ubuntu-latest-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
compiler-swc-cargo-cache-dev-ubuntu-latest | |
- run: pnpm install --frozen-lockfile | |
- name: Build | |
run: pnpm build | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Run unit tests | |
run: pnpm test:unit | |
- name: Run e2e tests | |
run: pnpm test:e2e |