This commit is contained in:
Nicolas Patry 2024-06-07 19:52:14 +02:00
parent 5e769ce1e0
commit a045ead6eb
No known key found for this signature in database
GPG Key ID: 690EBED7128A9DC8
2 changed files with 26 additions and 10 deletions

View File

@ -13,7 +13,7 @@ on:
required: true
jobs:
build-and-push-image:
build-and-push:
outputs:
docker_image: ${{ steps.final.outputs.docker_image }}
docker_devices: ${{ steps.final.outputs.docker_devices }}
@ -136,3 +136,28 @@ jobs:
echo "docker_image=registry.internal.huggingface.tech/api-inference/community/text-generation-inference:sha-${{ env.GITHUB_SHA_SHORT}}${{ env.LABEL }}" >> "$GITHUB_OUTPUT"
echo "docker_devices=${{ env.DOCKER_DEVICES }}" >> "$GITHUB_OUTPUT"
echo "runs_on=${{ env.RUNS_ON }}" >> "$GITHUB_OUTPUT"
integration_tests:
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
needs: build-and-push
runs-on: ${{ needs.build-and-push.outputs.runs_on }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4.4.1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10
- name: Install
run: |
make install-integration-tests
- name: Run tests
run: |
export DOCKER_VOLUME=/mnt/cache
export DOCKER_IMAGE=${{ needs.build-and-push.outputs.docker_image }}
export DOCKER_DEVICES=${{ needs.build-and-push.outputs.docker_devices }}
export HUGGING_FACE_HUB_TOKEN=${{ secrets.HUGGING_FACE_HUB_TOKEN }}
pytest -s -vv integration-tests

View File

@ -34,12 +34,3 @@ jobs:
with:
hardware: ${{ matrix.hardware }}
secrets: inherit
integration_tests:
needs: build
uses: ./.github/workflows/integration_tests.yaml # calls the one above ^
if: matrix.hardware == 'cuda'
with:
docker_image: ${{ needs.build.outputs.docker_image }}
docker_devices: ${{ needs.build.outputs.docker_devices }}
runs_on: ${{ needs.build.outputs.runs_on }}
secrets: inherit