Skip to content

Commit 2436c00

Browse files
b-chuirenedea
andauthored
Use ci-testing repo (#1000)
Co-authored-by: Irene Dea <[email protected]>
1 parent 5abbca0 commit 2436c00

File tree

9 files changed

+43
-353
lines changed

9 files changed

+43
-353
lines changed

.github/mcp/mcp_pytest.py

Lines changed: 0 additions & 148 deletions
This file was deleted.

.github/workflows/code-quality.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
branches:
99
- main
1010
- release/**
11-
workflow_call:
1211
workflow_dispatch:
1312
# Cancel old runs when a new commit is pushed to the same branch if not on main or dev
1413
concurrency:
@@ -30,14 +29,13 @@ jobs:
3029
- "[dev]"
3130
steps:
3231
- uses: actions/checkout@v3
33-
- uses: actions/setup-python@v4
32+
- name: Get composite run steps repository
33+
uses: actions/checkout@v3
3434
with:
35-
python-version: ${{ matrix.python_version }}
36-
- name: Setup
37-
run: |
38-
set -ex
39-
python -m pip install --upgrade 'pip<23' wheel
40-
python -m pip install --upgrade .${{ matrix.pip_deps }}
41-
- name: Run checks
42-
run: |
43-
pre-commit run --all-files
35+
repository: mosaicml/ci-testing
36+
ref: v0.0.2
37+
path: ./ci-testing
38+
- uses: ./ci-testing/.github/actions/code-quality
39+
with:
40+
python_version: ${{ matrix.python_version }}
41+
pip_deps: ${{ matrix.pip_deps }}

.github/workflows/codeql-analysis.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,12 @@ jobs:
3939
steps:
4040
- name: Checkout repository
4141
uses: actions/checkout@v2
42-
43-
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
42+
- name: Get composite run steps repository
43+
uses: actions/checkout@v3
4644
with:
47-
languages: ${{ matrix.language }}
48-
setup-python-dependencies: false
49-
# If you wish to specify custom queries, you can do so here or in a config file.
50-
# By default, queries listed here will override any specified in a config file.
51-
# Prefix the list here with "+" to use these queries and those in the config file.
52-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53-
54-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55-
# If this step fails, then you should remove it and run the build manually (see below)
56-
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v2
58-
59-
# ℹ️ Command-line programs to run using the OS shell.
60-
# 📚 https://git.io/JvXDl
61-
62-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63-
# and modify them (or add more) to build your code if your project
64-
# uses a compiled language
65-
66-
# - run: |
67-
# make bootstrap
68-
# make release
69-
70-
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v2
45+
repository: mosaicml/ci-testing
46+
ref: v0.0.2
47+
path: ./ci-testing
48+
- uses: ./ci-testing/.github/actions/codeql-analysis
49+
with:
50+
language: ${{ matrix.language }}

.github/workflows/coverage.yaml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,12 @@ jobs:
1212
steps:
1313
- name: Checkout Repo
1414
uses: actions/checkout@v3
15-
- name: Setup
16-
run: |
17-
set -ex
18-
python -m pip install --upgrade 'pip<23' wheel
19-
pip install coverage[toml]==6.5.0
20-
- name: Download artifacts
21-
uses: actions/download-artifact@v3
15+
- name: Get composite run steps repository
16+
uses: actions/checkout@v3
17+
with:
18+
repository: mosaicml/ci-testing
19+
ref: v0.0.2
20+
path: ./ci-testing
21+
- uses: ./ci-testing/.github/actions/coverage
2222
with:
23-
path: ${{ inputs.download-path }}
24-
- name: Generate coverage report
25-
run: |
26-
set -ex
27-
28-
# Flatten the coverage files
29-
ls ${{ inputs.download-path }} | while read x; do mv ${{ inputs.download-path }}/$x/.coverage .coverage.$x; done
30-
31-
python -m coverage combine
32-
python -m coverage report
23+
download-path: ${{ inputs.download-path }}

.github/workflows/pr-cpu.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1616
jobs:
1717
pytest-cpu:
18-
uses: ./.github/workflows/pytest-cpu.yaml
18+
uses: mosaicml/ci-testing/.github/workflows/pytest-cpu.yaml@v0.0.2
1919
strategy:
2020
matrix:
2121
include:
@@ -28,8 +28,10 @@ jobs:
2828
with:
2929
container: ${{ matrix.container }}
3030
name: ${{ matrix.name }}
31+
pip_deps: "[all-cpu]"
3132
pytest-command: ${{ matrix.pytest_command }}
3233
pytest-markers: ${{ matrix.markers }}
34+
safe_directory: llm-foundry
3335
coverage:
3436
uses: ./.github/workflows/coverage.yaml
3537
name: Coverage Results

.github/workflows/pr-gpu.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,30 @@ concurrency:
1515
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1616
jobs:
1717
pytest-gpu:
18-
uses: ./.github/workflows/pytest-gpu.yaml
18+
uses: mosaicml/ci-testing/.github/workflows/pytest-gpu.yaml@v0.0.2
1919
strategy:
2020
matrix:
2121
include:
2222
- name: "gpu-2.2.0"
2323
container: mosaicml/pytorch:2.2.0_cu121-python3.11-ubuntu20.04
2424
markers: "gpu"
25+
pip_deps: "[all]"
2526
pytest_command: "coverage run -m pytest"
26-
deps_group: "all"
2727
- name: "gpu-2.2.0-flash2"
2828
container: mosaicml/llm-foundry:2.2.0_cu121_flash2-latest
2929
markers: "gpu"
30+
pip_deps: "[all-flash2]"
3031
pytest_command: "coverage run -m pytest"
31-
deps_group: "all-flash2"
3232
name: ${{ matrix.name }}
3333
if: github.repository_owner == 'mosaicml'
3434
with:
3535
container: ${{ matrix.container }}
36+
git_repo: mosaicml/llm-foundry
3637
mcloud-timeout: 1800
3738
name: ${{ matrix.name }}
39+
pip_deps: ${{ matrix.pip_deps }}
3840
pytest-command: ${{ matrix.pytest_command }}
3941
pytest-markers: ${{ matrix.markers }}
4042
python-version: 3.9
41-
deps-group: ${{ matrix.deps_group }}
4243
secrets:
4344
mcloud-api-key: ${{ secrets.MCLOUD_API_KEY }}

.github/workflows/pytest-cpu.yaml

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)