feat: add state import doc #1877
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: Quality Assurance | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
pre-commit: | |
name: pre-commit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
# KLUDGE: This separator, in combination with the leading and trailing single quotes | |
# in the pre-commit command below, handle file names with spaces. | |
separator: "' '" | |
- name: Set Python up | |
uses: actions/setup-python@v4 | |
id: set-python-up | |
with: | |
cache: pip | |
cache-dependency-path: requirements-qa.txt | |
python-version-file: .python-version | |
- name: Install pre-commit | |
run: pip install -r requirements-qa.txt | |
- name: Cache pre-commit environments | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit/ | |
key: pre-commit-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Run pre-commit | |
run: | | |
pre-commit run --color=always --files '${{ steps.changed-files.outputs.all_changed_files }}' | |
# The reason for running the link check against all rather than just changed files is we can | |
# end up with a situation where a non-markdown file is removed that causes a broken link (e.g. a screenshot). | |
- name: Run link check against all files | |
run: | | |
pre-commit run --color=always --all-files markdown-link-check |