chore(deps): update dependency axios to ^1.8.2 #20175
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
name: CI | |
on: | |
merge_group: | |
types: [checks_requested] | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)" | |
required: false | |
default: false | |
pull_request: | |
types: [opened, synchronize] | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**/*.md" | |
- "website/**" | |
tags-ignore: | |
- "**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: ${{ github.ref_name != 'main' }} | |
permissions: | |
# Allow commenting on issues for `reusable-build.yml` | |
issues: write | |
jobs: | |
get-runner-labels: | |
name: Get Runner Labels | |
uses: ./.github/workflows/get-runner-labels.yml | |
check-changed: | |
runs-on: ubuntu-latest | |
name: Check Source Changed | |
outputs: | |
changed: ${{ steps.filter.outputs.changed == 'true' }} | |
document_changed: ${{ steps.document_filter.outputs.changed == 'true' }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 | |
id: filter | |
with: | |
predicate-quantifier: "every" | |
filters: | | |
changed: | |
- "!**/*.md" | |
- "!**/*.mdx" | |
- "!website/**" | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 | |
id: document_filter | |
with: | |
predicate-quantifier: "every" | |
filters: | | |
changed: | |
- "website/**" | |
test-linux: | |
name: Test Linux | |
needs: [get-runner-labels, check-changed] | |
uses: ./.github/workflows/reusable-build.yml | |
with: | |
target: x86_64-unknown-linux-gnu | |
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }} | |
skipable: ${{ needs.check-changed.outputs.changed != 'true' }} | |
bench: true | |
full-install: false | |
test-windows: | |
name: Test Windows | |
needs: [get-runner-labels, check-changed] | |
uses: ./.github/workflows/reusable-build.yml | |
with: | |
target: x86_64-pc-windows-msvc | |
profile: "dev" | |
runner: ${{ needs.get-runner-labels.outputs.WINDOWS_RUNNER_LABELS }} | |
skipable: ${{ needs.check-changed.outputs.changed != 'true' }} | |
full-install: false | |
test-mac: | |
name: Test Mac | |
needs: [get-runner-labels, check-changed] | |
if: github.ref_name == 'main' || contains(github.event.pull_request.title, '!macos') | |
uses: ./.github/workflows/reusable-build.yml | |
with: | |
target: x86_64-apple-darwin | |
profile: "ci" | |
runner: ${{ needs.get-runner-labels.outputs.MACOS_RUNNER_LABELS }} | |
skipable: ${{ needs.check-changed.outputs.changed != 'true' }} | |
full-install: false | |
cargo-deny: | |
name: Check license of dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 | |
id: filter | |
with: | |
filters: | | |
src: | |
- 'Cargo.lock' | |
- name: Install cargo-deny | |
if: steps.filter.outputs.src == 'true' | |
uses: taiki-e/install-action@3fc1605ecf43c14c7dd5ac06a4a629031ed3bdbd # v2 | |
with: | |
tool: [email protected] | |
- name: Check licenses | |
if: steps.filter.outputs.src == 'true' | |
run: cargo deny check license | |
spell: | |
name: Spell check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: crate-ci/typos@db35ee91e80fbb447f33b0e5fbddb24d2a1a884f # v1.29.10 | |
with: | |
files: . | |
lint: | |
name: Lint and format code | |
runs-on: ubuntu-latest | |
needs: [check-changed] | |
if: ${{ needs.check-changed.outputs.changed == 'true' }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 | |
id: changes | |
with: | |
filters: | | |
src: | |
- pnpm-lock.yaml | |
- '**/*.{ts,js,mjs,tsx,jsx}' | |
- name: Pnpm Setup | |
uses: ./.github/actions/pnpm/setup | |
- name: Pnpm Install | |
uses: ./.github/actions/pnpm/install-dependencies | |
- name: Lint js | |
if: steps.changes.outputs.src == 'true' | |
run: pnpm run lint-ci:js | |
- name: Prettier | |
if: steps.changes.outputs.src == 'true' | |
run: pnpm run format-ci:js | |
- name: Check Dependency Version | |
if: steps.changes.outputs.src == 'true' | |
run: pnpm run check-dependency-version | |
- name: API change check | |
if: steps.changes.outputs.src == 'true' | |
run: | | |
echo "====================================" | |
echo "Note: force build npm packages with \`pnpm build:js\` and \`pnpm api-extractor:local\` locally to generate API change if \`api-extractor\` check failed." | |
echo "$ pnpm build:js && pnpm api-extractor:local" | |
echo "====================================" | |
pnpm build:js | |
pnpm api-extractor:ci | |
- name: Documentation coverage check | |
if: steps.changes.outputs.src == 'true' | |
run: pnpm doc-coverage | |
lint-website: | |
name: Lint and format website | |
runs-on: ubuntu-latest | |
needs: [check-changed] | |
if: ${{ needs.check-changed.outputs.document_changed == 'true' }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Pnpm Setup | |
uses: ./.github/actions/pnpm/setup | |
- name: Pnpm Install | |
uses: ./.github/actions/pnpm/install-dependencies | |
- name: Run | |
run: | | |
cd website | |
pnpm install | |
pnpm run check:ci | |
rust_changes: | |
name: Rust Changes | |
runs-on: ubuntu-latest | |
needs: [check-changed] | |
if: ${{ needs.check-changed.outputs.changed == 'true' }} | |
outputs: | |
changed: ${{ steps.filter.outputs.changed }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 | |
id: filter | |
with: | |
filters: | | |
changed: | |
- '.github/workflows/ci.yml' | |
- 'crates/**' | |
- 'Cargo.lock' | |
- 'Cargo.toml' | |
- 'rust-toolchain.toml' | |
pnpm_lockfile_check: | |
name: Pnpm Lockfile Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Pnpm Setup | |
uses: ./.github/actions/pnpm/setup | |
- name: Pnpm Install | |
uses: ./.github/actions/pnpm/install-dependencies | |
with: | |
frozen-lockfile: true | |
rust_check: | |
name: Rust check | |
needs: [get-runner-labels, rust_changes] | |
if: ${{ needs.rust_changes.outputs.changed == 'true' }} | |
runs-on: ${{ fromJSON(needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS) }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Rust Toolchain | |
uses: ./.github/actions/rustup | |
with: | |
clippy: true | |
fmt: true | |
shared-key: check | |
- name: Pnpm Setup | |
uses: ./.github/actions/pnpm/setup | |
- name: Run Cargo Check | |
run: cargo check --workspace --all-targets --locked # Not using --release because it uses too much cache, and is also slow. | |
- name: Run Clippy | |
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1 | |
with: | |
command: clippy | |
args: --workspace --all-targets --tests -- -D warnings | |
- name: Run rustfmt | |
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Run toml format check | |
run: npm run format-ci:toml | |
rust_unused_dependencies: | |
name: Check Rust Unused Dependencies | |
needs: [get-runner-labels, rust_changes] | |
if: ${{ needs.rust_changes.outputs.changed == 'true' }} | |
runs-on: ${{ fromJSON(needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS) }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: ./.github/actions/rustup | |
with: | |
shared-key: check | |
- uses: cargo-bins/cargo-binstall@6010abb1da3dbaae07e8823fa57c0cd7cf183245 # v1.11.1 | |
- run: cargo binstall --no-confirm cargo-shear --force | |
- run: cargo shear | |
rust_test: | |
name: Rust test | |
needs: [get-runner-labels, rust_changes] | |
if: ${{ needs.rust_changes.outputs.changed == 'true' }} | |
runs-on: ${{ fromJSON(needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS) }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Rust Toolchain | |
uses: ./.github/actions/rustup | |
with: | |
save-cache: ${{ github.ref_name == 'main' }} | |
shared-key: check | |
# Compile test without debug info for reducing the CI cache size | |
- name: Change profile.test | |
shell: bash | |
run: | | |
echo '[profile.test]' >> Cargo.toml | |
echo 'debug = false' >> Cargo.toml | |
- name: Run test | |
# reason for excluding https://github.com/napi-rs/napi-rs/issues/2200 | |
run: cargo test --workspace --exclude rspack_node --exclude rspack -- --nocapture | |
- name: Run rspack test | |
run: cargo test --package rspack --all-features -- --nocapture | |
rust_test_miri: | |
name: Rust test miri | |
needs: [get-runner-labels, rust_changes] | |
# TODO: enable it after self hosted runners are ready | |
# if: needs.rust_changes.outputs.changed == 'true' && github.ref_name == 'main' && github.repository_owner == 'web-infra-dev' | |
if: false | |
runs-on: ${{ fromJSON(needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS) }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Rust Toolchain | |
uses: ./.github/actions/rustup | |
with: | |
save-cache: ${{ github.ref_name == 'main' }} | |
shared-key: check | |
miri: true | |
# Compile test without debug info for reducing the CI cache size | |
- name: Change profile.test | |
shell: bash | |
run: | | |
echo '[profile.test]' >> Cargo.toml | |
echo 'debug = false' >> Cargo.toml | |
- name: Run test | |
env: | |
MIRIFLAGS: -Zmiri-tree-borrows -Zmiri-disable-isolation | |
# reason for excluding https://github.com/napi-rs/napi-rs/issues/2200 | |
run: cargo miri test --workspace --exclude rspack_node -- --nocapture | |
failure_notification: | |
name: Failure Notification | |
needs: [test-linux, test-windows, test-mac, rust_check, rust_test] | |
if: ${{ failure() && !cancelled() && github.ref_name == 'main' && github.repository_owner == 'web-infra-dev' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4 | |
with: | |
node-version: 20 | |
- shell: bash | |
run: ./scripts/alert/lark.js | |
env: | |
TITLE: CI failed on main branch | |
DESCRIPTION: | | |
commitID: [${{github.sha}}](${{github.server_url}}/${{github.repository}}/commit/${{github.sha}}) | |
URL: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}} | |
LARK_WEBHOOK_URL: ${{secrets.LARK_WEBHOOK_URL}} | |
# TODO: enable it after self hosted runners are ready | |
# pkg-preview: | |
# name: Pkg Preview | |
# needs: | |
# - test-linux | |
# - test-windows | |
# - cargo-deny | |
# - lint | |
# - rust_check | |
# - rust_test | |
# # after merged to main branch | |
# if: ${{ !failure() && github.event_name == 'push' }} | |
# uses: ./.github/workflows/preview-commit.yml |