chore: update pre-commit after dropping Python 3.9 support #1110
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: vllm-rbln / PR | |
| on: | |
| pull_request: | |
| branches: | |
| - dev | |
| jobs: | |
| check-skip-ci: | |
| runs-on: rbln-sw-k8s-general | |
| outputs: | |
| should_skip: ${{ contains(github.event.pull_request.head.commit.message, '[skip ci]') }} | |
| steps: | |
| - name: Check if [skip ci] is in commit message | |
| run: | | |
| if ${{ contains(github.event.pull_request.head.commit.message, '[skip ci]') }}; then | |
| echo "Found [skip ci] in commit message, skipping CI" | |
| else | |
| echo "No [skip ci] found, continuing with CI" | |
| fi | |
| check-team-member: | |
| needs: check-skip-ci | |
| runs-on: rbln-sw-k8s-general | |
| if: ${{ needs.check-skip-ci.outputs.should_skip != 'true' }} | |
| outputs: | |
| is_team_member: ${{ steps.check_member.outputs.IS_TEAM_MEMBER }} | |
| is_collaborator: ${{ steps.check_collaborator.outputs.IS_COLLABORATOR }} | |
| steps: | |
| - name: Fetch team members | |
| id: fetch_team | |
| run: | | |
| response=$(curl -s -H "Authorization: Bearer ${{ secrets.GIT_PAT }}" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"query":"query { organization(login: \"rbln-sw\") { team1: team(slug: \"sw\") { members(first: 100) { nodes { login } } } team2: team(slug: \"fsw\") { members(first: 100) { nodes { login } } } } }"}' \ | |
| https://api.github.com/graphql) | |
| echo "$response" | jq -r '.data.organization.team1.members.nodes[].login, .data.organization.team2.members.nodes[].login' | sort -u > team_members.txt | |
| - name: Check if PR author is a team member | |
| id: check_member | |
| run: | | |
| pr_author=${{ github.event.pull_request.user.login }} | |
| echo "Checking if PR author '$pr_author' is a team member..." | |
| if grep -qx "$pr_author" team_members.txt; then | |
| result="true" | |
| echo "IS_TEAM_MEMBER=true" >> $GITHUB_OUTPUT | |
| echo "✅ IS_TEAM_MEMBER set to: $result" | |
| else | |
| result="false" | |
| echo "IS_TEAM_MEMBER=false" >> $GITHUB_OUTPUT | |
| echo "❌ IS_TEAM_MEMBER set to: $result" | |
| fi | |
| - name: Check if PR author is a collaborator | |
| id: check_collaborator | |
| if: ${{ steps.check_member.outputs.IS_TEAM_MEMBER != 'true' }} | |
| run: | | |
| pr_author=${{ github.event.pull_request.user.login }} | |
| echo "Checking if PR author '$pr_author' is a collaborator..." | |
| is_collaborator=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer ${{ secrets.GIT_PAT }}" \ | |
| https://api.github.com/repos/${{ github.repository }}/collaborators/$pr_author) | |
| echo "HTTP response code: $is_collaborator" | |
| if [ "$is_collaborator" -eq 204 ]; then | |
| result="true" | |
| echo "IS_COLLABORATOR=true" >> $GITHUB_OUTPUT | |
| echo "✅ IS_COLLABORATOR set to: $result" | |
| else | |
| result="false" | |
| echo "IS_COLLABORATOR=false" >> $GITHUB_OUTPUT | |
| echo "❌ IS_COLLABORATOR set to: $result" | |
| fi | |
| check-code-quality: | |
| needs: check-skip-ci | |
| uses: ./.github/workflows/pre-commit.yml | |
| trigger-internal-tests: | |
| needs: [check-skip-ci, check-team-member, check-code-quality] | |
| if: ${{ needs.check-skip-ci.outputs.should_skip != 'true' && (needs.check-team-member.outputs.is_team_member == 'true' || needs.check-team-member.outputs.is_collaborator == 'true') }} | |
| uses: ./.github/workflows/rbln_trigger_internal_test.yaml | |
| secrets: inherit |