mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-12 22:47:08 +02:00
* ci: only run what a change affects, consolidate jobs - detect affected plugins from changed files and Cargo.lock dependency trees - test/lint Rust per platform in shards instead of one job per plugin - fold check-generated-files into lint-javascript, fmt into a single job - skip fat LTO in integration test builds, single ABI in test-android * ci: run e2e on bumps, use published tauri CLI, PR-safe pnpm cache - trigger e2e on Cargo/pnpm lockfile and manifest changes - install the latest 2.x tauri-cli with cargo-binstall in integration tests - add setup-pnpm action: restore the store everywhere, save only on v2/v3 * fix clippy, ios build * fix bumps [skip ci]
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
name: Lint JavaScript
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- v1
|
|
- v2
|
|
paths: &paths
|
|
- '.github/workflows/lint-javascript.yml'
|
|
- '.github/actions/setup-pnpm/**'
|
|
- 'plugins/*/guest-js/**'
|
|
# generated by `pnpm build`, checked below
|
|
- 'plugins/*/api-iife.js'
|
|
- 'plugins/*/src/init-iife.js'
|
|
- 'plugins/*/rollup.config.js'
|
|
- 'plugins/*/tsconfig.json'
|
|
- 'shared/**'
|
|
- 'packages/**'
|
|
- 'eslint.config.js'
|
|
- 'tsconfig.base.json'
|
|
- 'pnpm-lock.yaml'
|
|
- 'pnpm-workspace.yaml'
|
|
- '**/package.json'
|
|
pull_request:
|
|
branches:
|
|
- v1
|
|
- v2
|
|
paths: *paths
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
eslint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: ./.github/actions/setup-pnpm
|
|
# the type-checked lint rules (and packages/api-e2e) resolve the plugins'
|
|
# types from their dist-js build output
|
|
- name: build
|
|
id: build
|
|
run: pnpm build
|
|
- name: eslint
|
|
run: pnpm lint
|
|
- name: ts:check
|
|
run: pnpm ts:check
|
|
# the build above regenerates the `api-iife.js` and `init-iife.js` files the Rust crates
|
|
# embed, which must be committed along with the guest-js changes they come from
|
|
- name: check generated files are up to date
|
|
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
|
|
run: ./.scripts/ci/has-diff.sh
|