Add missing dependent block checks to on_inclusion_list
#4137
Workflow file for this run
This file contains hidden or 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: Checks | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [opened, edited, reopened, synchronize] | |
| branches: | |
| - master | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Run linter for pyspec | |
| run: | | |
| make lint | |
| git diff --exit-code | |
| title: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check PR title | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| echo "Checking PR title: $PR_TITLE" | |
| # Check length (must be <= 68 characters) | |
| if [ ${#PR_TITLE} -gt 68 ]; then | |
| echo "PR title (${#PR_TITLE} characters) must be <= 68 characters" | |
| exit 1 | |
| fi | |
| # Check for leading or trailing whitespace | |
| if [[ "$PR_TITLE" =~ ^[[:space:]] ]] || [[ "$PR_TITLE" =~ [[:space:]]$ ]]; then | |
| echo "PR title must not have leading or trailing whitespace" | |
| exit 1 | |
| fi | |
| # Check for double spaces | |
| if [[ "$PR_TITLE" =~ [[:space:]]{2,} ]]; then | |
| echo "PR title must not contain double spaces" | |
| exit 1 | |
| fi | |
| # Check if starts with capital letter | |
| if ! [[ "$PR_TITLE" =~ ^[A-Z] ]]; then | |
| echo "PR title must start with a capital letter" | |
| exit 1 | |
| fi | |
| # Check if ends with punctuation | |
| if [[ "$PR_TITLE" =~ [.!?,\;]$ ]]; then | |
| echo "PR title must not end with punctuation" | |
| exit 1 | |
| fi | |
| # Check for correct tense (imperative mood) | |
| first_word=$(echo "$PR_TITLE" | awk '{print $1}') | |
| if [[ ! "$first_word" =~ ^(Embed|Shed)$ ]]; then | |
| if [[ "$first_word" =~ [^e]ed$ ]] || \ | |
| [[ "$first_word" =~ ies$ ]] || \ | |
| [[ "$first_word" =~ [^s]es$ ]] || \ | |
| [[ "$first_word" =~ [^s]s$ ]]; then | |
| echo "PR title must use imperative mood" | |
| exit 1 | |
| fi | |
| fi | |
| echo "PR title is valid" | |
| tests: | |
| needs: [lint] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| fork: | |
| - phase0 | |
| - altair | |
| - bellatrix | |
| - capella | |
| - deneb | |
| - electra | |
| - fulu | |
| - gloas | |
| - heze | |
| - eip8025 | |
| - eip8148 | |
| - eip8205 | |
| - eip8321 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Run pyspec tests for ${{ matrix.fork }} | |
| run: make test preset=minimal fork=${{ matrix.fork }} | |
| - name: Prepare test results for upload | |
| if: always() | |
| run: cp -r ./tests/core/pyspec/test-reports ./tests/core/pyspec/test-results-minimal-${{ matrix.fork }}-${{ github.run_number }} | |
| - name: Upload ${{ matrix.fork }} test results | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: always() | |
| with: | |
| name: test-results-minimal-${{ matrix.fork }}-${{ github.run_number }} | |
| path: ./tests/core/pyspec/test-results-minimal-${{ matrix.fork }}-${{ github.run_number }} | |
| comptests: | |
| needs: [lint] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| # Group slicing is round robin, so a 1/40 slice of the tiny config still | |
| # samples every fork and every test type for about a dozen groups. | |
| - name: Generate a sample of compliance tests | |
| run: | | |
| make comptests \ | |
| fc_gen_config=tiny \ | |
| preset=minimal \ | |
| fork=altair,bellatrix,capella,deneb,electra,fulu,gloas \ | |
| group_slice_index=0 \ | |
| group_slice_count=40 \ | |
| comptests_dir=./comptests-sample | |
| website: | |
| needs: [lint] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Build website | |
| run: make build_docs |