epic: lift payload job report errors into the job record #28
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
| # This workflow checks docstring style using pydocstyle on changed Python files only. | |
| name: pydocstyle-workflow | |
| on: | |
| push: | |
| branches: [ "master", "next" ] | |
| pull_request: | |
| branches: [ "master", "next" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.11", "3.12"] | |
| env: | |
| PYDOCSTYLE_VERSION: "==6.3.0" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: x64 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install "pydocstyle${{ env.PYDOCSTYLE_VERSION }}" | |
| - name: Setup env | |
| run: | | |
| pwd | |
| ls -lah | |
| pip freeze | |
| pydocstyle --version | |
| - name: Get changed Python files | |
| id: changed-files | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| BASE=${{ github.event.pull_request.base.sha }} | |
| else | |
| BASE=${{ github.event.before }} | |
| fi | |
| CHANGED=$(git diff --name-only "$BASE" "${{ github.sha }}" -- '*.py' | tr '\n' ' ') | |
| echo "files=$CHANGED" >> "$GITHUB_OUTPUT" | |
| - name: pydocstyle | |
| if: steps.changed-files.outputs.files != '' | |
| run: pydocstyle ${{ steps.changed-files.outputs.files }} |