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