Skip to content

Commit

Permalink
Use ci-testing repo
Browse files Browse the repository at this point in the history
  • Loading branch information
b-chu committed Feb 28, 2024
1 parent b082511 commit a40a3f0
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 353 deletions.
148 changes: 0 additions & 148 deletions .github/mcp/mcp_pytest.py

This file was deleted.

20 changes: 9 additions & 11 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
branches:
- main
- release/**
workflow_call:
workflow_dispatch:
# Cancel old runs when a new commit is pushed to the same branch if not on main or dev
concurrency:
Expand All @@ -30,14 +29,13 @@ jobs:
- "[dev]"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Get composite run steps repository
uses: actions/checkout@v3
with:
python-version: ${{ matrix.python_version }}
- name: Setup
run: |
set -ex
python -m pip install --upgrade 'pip<23' wheel
python -m pip install --upgrade .${{ matrix.pip_deps }}
- name: Run checks
run: |
pre-commit run --all-files
repository: mosaicml/ci-testing
ref: v0.0.2
path: ./ci-testing
- uses: ./ci-testing/.github/actions/code-quality
with:
python_version: ${{ matrix.python_version }}
pip_deps: ${{ matrix.pip_deps }}
37 changes: 8 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
- name: Get composite run steps repository
uses: actions/checkout@v3
with:
languages: ${{ matrix.language }}
setup-python-dependencies: false
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

# - run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
repository: mosaicml/ci-testing
ref: v0.0.2
path: ./ci-testing
- uses: ./ci-testing/.github/actions/codeql-analysis
with:
language: ${{ matrix.language }}
25 changes: 8 additions & 17 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,12 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup
run: |
set -ex
python -m pip install --upgrade 'pip<23' wheel
pip install coverage[toml]==6.5.0
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Get composite run steps repository
uses: actions/checkout@v3
with:
repository: mosaicml/ci-testing
ref: v0.0.2
path: ./ci-testing
- uses: ./ci-testing/.github/actions/coverage
with:
path: ${{ inputs.download-path }}
- name: Generate coverage report
run: |
set -ex
# Flatten the coverage files
ls ${{ inputs.download-path }} | while read x; do mv ${{ inputs.download-path }}/$x/.coverage .coverage.$x; done
python -m coverage combine
python -m coverage report
download-path: ${{ inputs.download-path }}
4 changes: 3 additions & 1 deletion .github/workflows/pr-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
pytest-cpu:
uses: ./.github/workflows/pytest-cpu.yaml
uses: mosaicml/ci-testing/.github/workflows/pytest-cpu.yaml@v0.0.2
strategy:
matrix:
include:
Expand All @@ -28,8 +28,10 @@ jobs:
with:
container: ${{ matrix.container }}
name: ${{ matrix.name }}
pip_deps: "[all-cpu]"
pytest-command: ${{ matrix.pytest_command }}
pytest-markers: ${{ matrix.markers }}
safe_directory: llm-foundry
coverage:
uses: ./.github/workflows/coverage.yaml
name: Coverage Results
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pr-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,30 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
pytest-gpu:
uses: ./.github/workflows/pytest-gpu.yaml
uses: mosaicml/ci-testing/.github/workflows/pytest-gpu.yaml@v0.0.2
strategy:
matrix:
include:
- name: "gpu-2.2.0"
container: mosaicml/pytorch:2.2.0_cu121-python3.11-ubuntu20.04
markers: "gpu"
pip_deps: "[all]"
pytest_command: "coverage run -m pytest"
deps_group: "all"
- name: "gpu-2.2.0-flash2"
container: mosaicml/llm-foundry:2.2.0_cu121_flash2-latest
markers: "gpu"
pip_deps: "[all-flash2]"
pytest_command: "coverage run -m pytest"
deps_group: "all-flash2"
name: ${{ matrix.name }}
if: github.repository_owner == 'mosaicml'
with:
container: ${{ matrix.container }}
git_repo: mosaicml/llm-foundry
mcloud-timeout: 1800
name: ${{ matrix.name }}
pip_deps: ${{ matrix.pip_deps }}
pytest-command: ${{ matrix.pytest_command }}
pytest-markers: ${{ matrix.markers }}
python-version: 3.9
deps-group: ${{ matrix.deps_group }}
secrets:
mcloud-api-key: ${{ secrets.MCLOUD_API_KEY }}
48 changes: 0 additions & 48 deletions .github/workflows/pytest-cpu.yaml

This file was deleted.

Loading

0 comments on commit a40a3f0

Please sign in to comment.