File size: 1,358 Bytes
ca4fc4d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
name: Pytest CPU
on:
workflow_call:
inputs:
container:
required: true
type: string
name:
required: true
type: string
pytest-command:
required: true
type: string
pytest-markers:
required: true
type: string
jobs:
pytest-cpu:
timeout-minutes: 30
runs-on: ubuntu-latest
container: ${{ inputs.container }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup
run: |
set -ex
export PATH=/composer-python:$PATH
python -m pip install --upgrade 'pip<23' wheel
python -m pip install --upgrade .[dev]
- name: Run Tests
id: tests
run: |
set -ex
export PATH=/composer-python:$PATH
export COMMON_ARGS="-v --durations=20 -m '${{ inputs.pytest-markers }}'"
# Necessary to run git diff for doctests
git config --global --add safe.directory /__w/llm-foundry/llm-foundry
make test PYTEST='${{ inputs.pytest-command }}' EXTRA_ARGS="$COMMON_ARGS --codeblocks"
# make test-dist PYTEST='${{ inputs.pytest-command }}' EXTRA_ARGS="$COMMON_ARGS" WORLD_SIZE=2
python -m coverage combine
- uses: actions/upload-artifact@v3
with:
name: coverage-${{ github.sha }}-${{ inputs.name }}
path: .coverage
|