chore: bump up rollup version to v4.14.1 (#778) #26
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 | |
# Jobs in this workflow are all required run successfully before the PR can be merged. This is enforced by using github status checks. | |
# What's github status check: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: ${{ github.ref_name != 'main' }} | |
jobs: | |
# JOB to run change detection | |
Changes: # https://github.com/dorny/paths-filter | |
name: Detect Changes | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
outputs: | |
rust-changes: ${{ (steps.filter.outputs.rust-changes == 'true') || (github.ref_name == 'main') }} | |
node-changes: ${{ (steps.filter.outputs.node-changes == 'true') || (github.ref_name == 'main') }} | |
steps: | |
# For pull requests it's not necessary to checkout the code | |
- uses: actions/checkout@v4 #Fix https://github.com/dorny/paths-filter/issues/212 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
rust-changes: &rust-changes | |
- 'crates/**' | |
- 'Cargo.toml' | |
- 'Cargo.lock' | |
- 'rust-toolchain.toml' | |
- 'deny.toml' | |
node-changes: | |
- *rust-changes | |
- 'packages/**' | |
- 'web/playground' | |
- 'examples/**' | |
- 'scripts/**' | |
- 'package.json' | |
- 'pnpm-lock.yaml' | |
- 'pnpm-workspace.yaml' | |
- name: Show outputs | |
run: | | |
echo "Rust changes: ${{ (steps.filter.outputs.rust-changes == 'true') || (github.ref_name == 'main') }}" | |
echo "Node changes: ${{ (steps.filter.outputs.node-changes == 'true') || (github.ref_name == 'main') }}" | |
cargo-deny: | |
name: Cargo Deny | |
needs: changes | |
if: ${{ needs.changes.outputs.rust-changes == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
src: | |
- 'Cargo.lock' | |
- name: Install cargo-deny | |
if: steps.filter.outputs.src == 'true' | |
uses: taiki-e/install-action@cargo-deny | |
- if: steps.filter.outputs.src == 'true' | |
run: cargo deny check | |
rust-validation: | |
name: Rust Validation | |
needs: changes | |
if: ${{ needs.changes.outputs.rust-changes == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: moonrepo/setup-rust@v1 | |
with: | |
bins: just, taplo-cli | |
cache-base: main | |
components: clippy,rustfmt | |
- name: Lint | |
run: just lint-rust | |
cargo-test: | |
needs: changes | |
strategy: | |
matrix: | |
target: [ubuntu-latest, macos-latest, windows-latest] | |
uses: ./.github/workflows/reusable-cargo-test.yml | |
with: | |
os: ${{ matrix.target }} | |
changed: ${{ needs.changes.outputs.rust-changes == 'true' }} | |
node-test: | |
needs: changes | |
strategy: | |
matrix: | |
target: [ubuntu-latest, macos-latest, windows-latest] | |
uses: ./.github/workflows/reusable-node-test.yml | |
with: | |
os: ${{ matrix.target }} | |
changed: ${{ needs.changes.outputs.node-changes == 'true' }} | |
node-validation: | |
name: Node Validation | |
needs: changes | |
if: ${{ needs.changes.outputs.node-changes == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint Code | |
run: pnpm lint-code | |
repo-validation: | |
name: Repo Validation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint Filename | |
run: pnpm lint-filename | |
- name: Lint Spell | |
run: pnpm lint-spell | |
- name: Lint Prettier | |
run: pnpm lint-prettier | |
- name: Lint Toml | |
run: pnpm lint-toml |