use tags again for test image, only run docker e2e after pre-commit checks (#1081)
Browse files- .github/workflows/tests-docker.yml +0 -54
- .github/workflows/tests.yml +47 -20
.github/workflows/tests-docker.yml
DELETED
|
@@ -1,54 +0,0 @@
|
|
| 1 |
-
name: e2e-docker-tests
|
| 2 |
-
|
| 3 |
-
on:
|
| 4 |
-
pull_request:
|
| 5 |
-
paths:
|
| 6 |
-
- '**.py'
|
| 7 |
-
- 'requirements.txt'
|
| 8 |
-
- '.github/workflows/*.yml'
|
| 9 |
-
workflow_dispatch:
|
| 10 |
-
|
| 11 |
-
jobs:
|
| 12 |
-
build-axolotl:
|
| 13 |
-
if: github.repository_owner == 'OpenAccess-AI-Collective'
|
| 14 |
-
# this job needs to be run on self-hosted GPU runners...
|
| 15 |
-
strategy:
|
| 16 |
-
fail-fast: false
|
| 17 |
-
matrix:
|
| 18 |
-
include:
|
| 19 |
-
- cuda: 118
|
| 20 |
-
cuda_version: 11.8.0
|
| 21 |
-
python_version: "3.10"
|
| 22 |
-
pytorch: 2.0.1
|
| 23 |
-
- cuda: 121
|
| 24 |
-
cuda_version: 12.1.0
|
| 25 |
-
python_version: "3.10"
|
| 26 |
-
pytorch: 2.1.1
|
| 27 |
-
runs-on: [self-hosted, gpu, docker]
|
| 28 |
-
steps:
|
| 29 |
-
- name: Checkout
|
| 30 |
-
uses: actions/checkout@v4
|
| 31 |
-
- name: Build Docker image
|
| 32 |
-
run: |
|
| 33 |
-
# Set up build arguments
|
| 34 |
-
BASE_TAG="main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}"
|
| 35 |
-
CUDA="${{ matrix.cuda }}"
|
| 36 |
-
PYTORCH_VERSION="${{ matrix.pytorch }}"
|
| 37 |
-
# Build the Docker image
|
| 38 |
-
docker build . \
|
| 39 |
-
--file ./docker/Dockerfile-tests \
|
| 40 |
-
--build-arg BASE_TAG=$BASE_TAG \
|
| 41 |
-
--build-arg CUDA=$CUDA \
|
| 42 |
-
--build-arg GITHUB_REF=$GITHUB_REF \
|
| 43 |
-
--build-arg PYTORCH_VERSION=$PYTORCH_VERSION \
|
| 44 |
-
--tag test-axolotl \
|
| 45 |
-
--no-cache
|
| 46 |
-
- name: Unit Tests w docker image
|
| 47 |
-
run: |
|
| 48 |
-
docker run --rm test-axolotl pytest --ignore=tests/e2e/ /workspace/axolotl/tests/
|
| 49 |
-
- name: GPU Unit Tests w docker image
|
| 50 |
-
run: |
|
| 51 |
-
docker run --privileged --gpus "all" --env WANDB_DISABLED=true --rm test-axolotl pytest --ignore=tests/e2e/patched/ /workspace/axolotl/tests/e2e/
|
| 52 |
-
- name: GPU Unit Tests monkeypatched w docker image
|
| 53 |
-
run: |
|
| 54 |
-
docker run --privileged --gpus "all" --env WANDB_DISABLED=true --rm test-axolotl pytest /workspace/axolotl/tests/e2e/patched/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/workflows/tests.yml
CHANGED
|
@@ -7,10 +7,12 @@ on:
|
|
| 7 |
paths:
|
| 8 |
- '**.py'
|
| 9 |
- 'requirements.txt'
|
|
|
|
| 10 |
pull_request:
|
| 11 |
paths:
|
| 12 |
- '**.py'
|
| 13 |
- 'requirements.txt'
|
|
|
|
| 14 |
workflow_dispatch:
|
| 15 |
|
| 16 |
jobs:
|
|
@@ -53,29 +55,54 @@ jobs:
|
|
| 53 |
run: |
|
| 54 |
pytest --ignore=tests/e2e/ tests/
|
| 55 |
|
| 56 |
-
e2e-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
| 60 |
needs: [pre-commit, pytest]
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
steps:
|
| 63 |
-
- name:
|
| 64 |
-
uses: actions/checkout@
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
uses:
|
| 68 |
with:
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
- name: Install dependencies
|
| 73 |
run: |
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
run: |
|
| 81 |
-
pytest tests/e2e/
|
|
|
|
| 7 |
paths:
|
| 8 |
- '**.py'
|
| 9 |
- 'requirements.txt'
|
| 10 |
+
- '.github/workflows/*.yml'
|
| 11 |
pull_request:
|
| 12 |
paths:
|
| 13 |
- '**.py'
|
| 14 |
- 'requirements.txt'
|
| 15 |
+
- '.github/workflows/*.yml'
|
| 16 |
workflow_dispatch:
|
| 17 |
|
| 18 |
jobs:
|
|
|
|
| 55 |
run: |
|
| 56 |
pytest --ignore=tests/e2e/ tests/
|
| 57 |
|
| 58 |
+
docker-e2e-tests:
|
| 59 |
+
if: github.repository_owner == 'OpenAccess-AI-Collective'
|
| 60 |
+
# this job needs to be run on self-hosted GPU runners...
|
| 61 |
+
runs-on: [self-hosted, gpu, docker]
|
| 62 |
+
timeout-minutes: 30
|
| 63 |
needs: [pre-commit, pytest]
|
| 64 |
|
| 65 |
+
strategy:
|
| 66 |
+
fail-fast: false
|
| 67 |
+
matrix:
|
| 68 |
+
include:
|
| 69 |
+
- cuda: 118
|
| 70 |
+
cuda_version: 11.8.0
|
| 71 |
+
python_version: "3.10"
|
| 72 |
+
pytorch: 2.0.1
|
| 73 |
+
- cuda: 121
|
| 74 |
+
cuda_version: 12.1.0
|
| 75 |
+
python_version: "3.10"
|
| 76 |
+
pytorch: 2.1.1
|
| 77 |
steps:
|
| 78 |
+
- name: Checkout
|
| 79 |
+
uses: actions/checkout@v4
|
| 80 |
+
- name: Docker metadata
|
| 81 |
+
id: metadata
|
| 82 |
+
uses: docker/metadata-action@v5
|
| 83 |
with:
|
| 84 |
+
images: winglian/axolotl-tests
|
| 85 |
+
- name: Build Docker image
|
|
|
|
|
|
|
| 86 |
run: |
|
| 87 |
+
# Set up build arguments
|
| 88 |
+
BASE_TAG="main-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}"
|
| 89 |
+
CUDA="${{ matrix.cuda }}"
|
| 90 |
+
PYTORCH_VERSION="${{ matrix.pytorch }}"
|
| 91 |
+
# Build the Docker image
|
| 92 |
+
docker build . \
|
| 93 |
+
--file ./docker/Dockerfile-tests \
|
| 94 |
+
--build-arg BASE_TAG=$BASE_TAG \
|
| 95 |
+
--build-arg CUDA=$CUDA \
|
| 96 |
+
--build-arg GITHUB_REF=$GITHUB_REF \
|
| 97 |
+
--build-arg PYTORCH_VERSION=$PYTORCH_VERSION \
|
| 98 |
+
--tag ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }} \
|
| 99 |
+
--no-cache
|
| 100 |
+
- name: Unit Tests w docker image
|
| 101 |
+
run: |
|
| 102 |
+
docker run --rm ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }} pytest --ignore=tests/e2e/ /workspace/axolotl/tests/
|
| 103 |
+
- name: GPU Unit Tests w docker image
|
| 104 |
+
run: |
|
| 105 |
+
docker run --privileged --gpus "all" --env WANDB_DISABLED=true --rm ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }} pytest --ignore=tests/e2e/patched/ /workspace/axolotl/tests/e2e/
|
| 106 |
+
- name: GPU Unit Tests monkeypatched w docker image
|
| 107 |
run: |
|
| 108 |
+
docker run --privileged --gpus "all" --env WANDB_DISABLED=true --rm ${{ steps.metadata.outputs.tags }}-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }} pytest /workspace/axolotl/tests/e2e/patched/
|