forked from mosaicml/llm-foundry
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.33 KB
/
pytest-cpu.yaml
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
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 .[all-cpu]
- 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