Skip to content

feat(notification)!: add more NotificationBuilder parameters #142

feat(notification)!: add more NotificationBuilder parameters

feat(notification)!: add more NotificationBuilder parameters #142

Workflow file for this run

# WARNING: Do not change the name of this file, keep `lint-test.yml`.
# `workflow_call` needs the name of the workflow file to work.
name: Lint check and test
# We only automatically run checks for PRs.
# It is best to avoid direct commits to the main branch, instead make a PR for checks.
on:
pull_request:
workflow_dispatch:
# NOTE: set `secrets: inherit` when call this workflow from other workflow.
workflow_call:
defaults:
run:
shell: bash
jobs:
# don't use `pull_request.paths`, see: <https://github.com/github/docs/issues/8926#issuecomment-1635678516>
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
outputs:
paths: ${{ steps.filter.outputs.paths }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
predicate-quantifier: "every"
filters: |
paths:
- "!docs/**"
- "!**/*.md"
- "!.github/ISSUE_TEMPLATE/**"
- "!.github/dependabot.yml"
pre-commit-run:
needs: changes
if: ${{ !startsWith(github.head_ref, 'releases/') && needs.changes.outputs.paths == 'true'}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: ["ubuntu-latest", "windows-latest"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup-envs-ver
id: setup-envs-ver
uses: ./.github/actions/setup-envs-ver
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
# see: <https://docs.astral.sh/uv/guides/integration/github/>
version: ${{ steps.setup-envs-ver.outputs.uv }}
enable-cache: true
- name: Setup Python
uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}
# see: <https://github.com/pnpm/action-setup>
- name: Install pnpm
uses: pnpm/action-setup@v4
# see: <https://github.com/actions/setup-node>
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "pnpm"
# see: <https://github.com/dtolnay/rust-toolchain>
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
# see: <https://github.com/swatinem/rust-cache>
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
key: py-${{ matrix.python-version }}
- name: Cache pre-commit
uses: ./.github/actions/cache-pre-commit
- name: setup-sys-deps
if: matrix.os == 'ubuntu-latest'
uses: ./.github/actions/setup-sys-deps
- name: pnpm install
run: pnpm install --frozen-lockfile
- name: pnpm build frontend
run: pnpm -r build
- name: pre-commit run
env:
# see `setup.py` of examples,
# we don't need compile the extension files,
# because we are not using it.
PYTAURI_STANDALONE: "1"
run: |
uv run --all-extras \
-- pre-commit run --show-diff-on-failure --color=always --hook-stage=manual --all-files
# https://github.com/marketplace/actions/alls-green#why
lint-test-all-green: # This job does nothing and is only used for the branch protection
if: always() # IMPORTANT: mandatory
needs:
- pre-commit-run
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: "pre-commit-run"