Skip to content

update: ray=2.40 -> 2.44 #1407

update: ray=2.40 -> 2.44

update: ray=2.40 -> 2.44 #1407

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Unit Test coverage
on: [push, pull_request]
env:
AWS_DEFAULT_REGION: us-west-2
jobs:
collab-check:
runs-on: ubuntu-latest
outputs:
approval-env: ${{ steps.collab-check.outputs.result }}
steps:
- name: Collaborator Check
uses: actions/github-script@v7
id: collab-check
with:
github-token: ${{ github.token }}
result-encoding: string
script: |
try {
const res = await github.rest.repos.checkCollaborator({
owner: context.repo.owner,
repo: context.repo.repo,
username: "${{ github.event.pull_request.user.login }}",
});
console.log("Verifed ${{ github.event.pull_request.user.login }} is a repo collaborator. Auto Approving PR Checks.")
return res.status == "204" ? "auto-approve" : "manual-approval"
} catch (error) {
console.log("${{ github.event.pull_request.user.login }} is not a collaborator. Requiring Manual Approval to run PR Checks.")
return "manual-approval"
}
wait-for-approval:
runs-on: ubuntu-latest
needs: [collab-check]
environment: ${{ needs.collab-check.outputs.approval-env }}
steps:
- run: echo "Workflow Approved! Starting PR Checks."
test_coverage_python:
runs-on: ubuntu-latest
continue-on-error: false
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
env:
PYTHONWARNINGS: ignore
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup Environment
run: |
./devtool env_setup
- name: Create virtual env
run: |
python -m venv .fmeval_venv
source .fmeval_venv/bin/activate
- name: Install dependencies with poetry
run: |
./devtool install_deps
- name: Test with code coverage
run: |
./devtool unit_test_with_coverage
echo "All build and unit tests passed."
- name: Build Package binary wheel
run: |
./devtool build_package
echo "Package build Succeeded. 😊"