feat(tms): サーバーカスタムCSS #219
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: Lint | |
on: | |
push: | |
branches: | |
- taiyme | |
- release | |
pull_request_target: | |
branches: | |
- taiyme | |
- release | |
permissions: | |
contents: read | |
jobs: | |
pre-checkout: | |
name: Pre checkout | |
uses: ./.github/workflows/pre-checkout.yaml | |
files-changed: | |
name: Filter files | |
runs-on: ubuntu-22.04 | |
permissions: | |
pull-requests: write | |
outputs: | |
lint-packages: ${{ steps.filter-lint-packages.outputs.changes }} | |
typecheck-packages: ${{ steps.filter-typecheck-packages.outputs.changes }} | |
steps: | |
- name: Checkout ${{ github.sha }} | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
ref: ${{ github.sha }} | |
fetch-depth: 1 | |
- name: Filter Lint packages | |
id: filter-lint-packages | |
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
with: | |
filters: | | |
__shared__: &__shared__ | |
- .github/workflows/lint.yaml | |
- packages/shared/eslint.config.js | |
misskey-reversi: | |
- *__shared__ | |
- packages/misskey-reversi/** | |
misskey-bubble-game: | |
- *__shared__ | |
- packages/misskey-bubble-game/** | |
misskey-js: | |
- *__shared__ | |
- packages/misskey-js/** | |
backend: | |
- *__shared__ | |
- packages/backend/** | |
sw: | |
- *__shared__ | |
- packages/sw/** | |
frontend-shared: | |
- *__shared__ | |
- packages/frontend-shared/** | |
frontend: | |
- *__shared__ | |
- packages/frontend/** | |
frontend-embed: | |
- *__shared__ | |
- packages/frontend-embed/** | |
- name: Filter Typecheck packages | |
id: filter-typecheck-packages | |
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
with: | |
filters: | | |
__shared__: &__shared__ | |
- .github/workflows/lint.yaml | |
misskey-reversi: &misskey-reversi | |
- *__shared__ | |
- packages/misskey-reversi/** | |
misskey-bubble-game: &misskey-bubble-game | |
- *__shared__ | |
- packages/misskey-bubble-game/** | |
misskey-js: &misskey-js | |
- *__shared__ | |
- packages/misskey-js/** | |
backend: | |
- *__shared__ | |
- *misskey-js | |
- *misskey-reversi | |
- packages/backend/** | |
sw: | |
- *__shared__ | |
- *misskey-js | |
- packages/sw/** | |
# frontend-shared: &frontend-shared | |
# - *__shared__ | |
# - packages/frontend-shared/** | |
# frontend: | |
# - *__shared__ | |
# - *misskey-js | |
# - *misskey-reversi | |
# - *misskey-bubble-game | |
# - *frontend-shared | |
# - packages/frontend/** | |
# frontend-embed: | |
# - *__shared__ | |
# - *misskey-js | |
# - *frontend-shared | |
# - packages/frontend-embed/** | |
lint: | |
name: Lint | |
runs-on: ubuntu-22.04 | |
needs: | |
- pre-checkout | |
- files-changed | |
strategy: | |
fail-fast: false | |
matrix: | |
package: ${{ fromJSON(needs.files-changed.outputs.lint-packages) }} | |
env: | |
eslint-cache-version: v1 | |
eslint-cache-path: ${{ github.workspace }}/node_modules/.cache/eslint-${{ matrix.package }} | |
steps: | |
- name: Checkout | |
if: matrix.package != '__shared__' | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
ref: ${{ needs.pre-checkout.outputs.sha }} | |
fetch-depth: 1 | |
submodules: true | |
- name: Setup pnpm | |
if: matrix.package != '__shared__' | |
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
with: | |
run_install: false | |
- name: Setup Node.js | |
if: matrix.package != '__shared__' | |
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
with: | |
node-version-file: .node-version | |
cache: pnpm | |
- name: Install dependencies | |
if: matrix.package != '__shared__' | |
run: | | |
pnpm i --frozen-lockfile | |
- name: Restore eslint cache | |
if: matrix.package != '__shared__' | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | |
with: | |
path: ${{ env.eslint-cache-path }} | |
key: eslint-${{ env.eslint-cache-version }}-${{ matrix.package }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ needs.pre-checkout.outputs.sha }} | |
restore-keys: eslint-${{ env.eslint-cache-version }}-${{ matrix.package }}-${{ hashFiles('**/pnpm-lock.yaml') }}- | |
- name: Run eslint | |
if: matrix.package != '__shared__' | |
run: | | |
pnpm --filter ${{ matrix.package }} run eslint --cache --cache-location ${{ env.eslint-cache-path }} --cache-strategy content | |
typecheck: | |
name: Typecheck | |
runs-on: ubuntu-22.04 | |
needs: | |
- pre-checkout | |
- files-changed | |
strategy: | |
fail-fast: false | |
matrix: | |
package: ${{ fromJSON(needs.files-changed.outputs.typecheck-packages) }} | |
steps: | |
- name: Checkout | |
if: matrix.package != '__shared__' | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
ref: ${{ needs.pre-checkout.outputs.sha }} | |
fetch-depth: 1 | |
submodules: true | |
- name: Setup pnpm | |
if: matrix.package != '__shared__' | |
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
with: | |
run_install: false | |
- name: Setup Node.js | |
if: matrix.package != '__shared__' | |
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
with: | |
node-version-file: .node-version | |
cache: pnpm | |
- name: Install dependencies | |
if: matrix.package != '__shared__' | |
run: | | |
pnpm i --frozen-lockfile | |
- name: Build dependencies | |
if: matrix.package != '__shared__' | |
run: | | |
pnpm --filter '${{ matrix.package }}...' --filter '!${{ matrix.package }}' run build | |
- name: Run typecheck | |
if: matrix.package != '__shared__' | |
run: | | |
pnpm --filter ${{ matrix.package }} run typecheck |