fix(formatjs): Variable evaluate concatenation #329
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| on: | |
| pull_request: | |
| types: ["opened", "reopened", "synchronize"] | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: "${{ github.event_name == 'pull_request' }}" | |
| env: | |
| RUST_LOG: debug | |
| CARGO_INCREMENTAL: 0 | |
| CI: "1" | |
| jobs: | |
| npm-test: | |
| name: "Integration Test" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: 20 | |
| - name: Configure path (windows) | |
| shell: bash | |
| if: runner.os == 'Windows' | |
| run: | | |
| echo 'C:\\npm\\prefix' >> $GITHUB_PATH | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "npm-test" | |
| cache-on-failure: true | |
| - name: Update corepack | |
| run: | | |
| echo "Before: corepack version => $(corepack --version || echo 'not installed')" | |
| npm install -g corepack@latest | |
| echo "After : corepack version => $(corepack --version)" | |
| echo "Before: corepack version => $(corepack --version || echo 'not installed')" | |
| - name: Install corepack, pnpm, and dependencies | |
| run: | | |
| corepack enable | |
| pnpm --version | |
| pnpm i | |
| - name: Test | |
| run: | | |
| pnpm test | |
| cargo-check: | |
| name: "Check (swc_ast_unknown)" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "cargo-check" | |
| cache-on-failure: true | |
| - name: Run cargo check | |
| env: | |
| RUSTFLAGS: "--cfg swc_ast_unknown" | |
| run: | | |
| cargo check --workspace --exclude swc_plugin_styled_jsx --exclude styled_jsx | |
| cargo-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| name: Test - ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Handle line endings | |
| shell: bash | |
| if: runner.os == 'Windows' | |
| run: | | |
| git config --system core.autocrlf false | |
| git config --system core.eol lf | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - name: Setupz node | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: 16 | |
| - name: Configure path (windows) | |
| shell: bash | |
| if: runner.os == 'Windows' | |
| run: | | |
| echo 'C:\\npm\\prefix' >> $GITHUB_PATH | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "cargo-test" | |
| cache-on-failure: true | |
| - name: Run cargo test | |
| run: | | |
| cargo test --all --color always | |
| cargo-publish: | |
| name: "Publish" | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - name: Install cargo-mono | |
| uses: baptiste0928/cargo-install@v2 | |
| with: | |
| crate: cargo-mono | |
| version: "0.4.1" | |
| locked: true | |
| - name: Publish | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: | | |
| cargo mono publish --no-verify | |
| done: | |
| needs: | |
| - npm-test | |
| - cargo-check | |
| - cargo-test | |
| if: >- | |
| ${{ always() }} | |
| runs-on: ubuntu-latest | |
| name: Done | |
| steps: | |
| - run: exit 1 | |
| if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')) }} |