Skip to content

Commit

Permalink
Merge pull request #1140 from instadeepai/chore/ci
Browse files Browse the repository at this point in the history
chore: only run integration tests after merge to dev
  • Loading branch information
sash-a authored Nov 22, 2024
2 parents c05b639 + 77e3e29 commit bf1613b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Tests and Linters 🧪
name: CI 🧪

on: [ pull_request ]

jobs:
tests-and-linters:
linters:
name: "Python ${{ matrix.python-version }} on ubuntu-latest"
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 5

strategy:
matrix:
Expand All @@ -19,7 +19,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.26"
version: "0.5.4"
enable-cache: true
cache-dependency-glob: "requirements/requirements**.txt" # invalidate cache when requirements file changes

Expand All @@ -34,6 +34,3 @@ jobs:

- name: Run linters 🖌️
run: pre-commit run --all-files --verbose

- name: Run tests 🧪
run: pytest -p no:warnings
35 changes: 35 additions & 0 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Integration Tests 🧪

on:
push:
branches:
- develop

jobs:
integration-tests:
name: "Python ${{ matrix.python-version }} on ubuntu-latest"
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout mava
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.4"
enable-cache: true
cache-dependency-glob: "requirements/requirements**.txt" # invalidate cache when requirements file changes

- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"

- name: Install python dependencies 🔧
run: uv pip install .[dev]
env:
UV_SYSTEM_PYTHON: 1

- name: Run integration tests 🧪
run: pytest test/integration_test.py -p no:warnings
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y git build-essential pkg-config libhdf5-

# Add uv and use the system python (no need to make venv)
USER root
COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /bin/uv
COPY --from=ghcr.io/astral-sh/uv:0.5.4 /uv /bin/uv
ENV UV_SYSTEM_PYTHON=1

WORKDIR /home/app/mava
Expand Down

0 comments on commit bf1613b

Please sign in to comment.