Skip to content

Commit 2f8676c

Browse files
authored
Merge pull request #117 from lichess-org/copilot/fix-116
Fix GitHub Actions integration_test.yml to work with lila-docker service
2 parents 6972c6d + 0ad3b69 commit 2f8676c

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed
Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
name: Lila integration test
22

33
on:
4-
- push
5-
- pull_request
4+
push:
5+
branches: ["master"]
6+
paths:
7+
- ".github/workflows/integration_test.yml"
8+
- "integration/**"
9+
- "**.py"
10+
- "uv.lock"
11+
- "pyproject.toml"
12+
pull_request:
13+
paths:
14+
- ".github/workflows/integration_test.yml"
15+
- "integration/**"
16+
- "**.py"
17+
- "uv.lock"
18+
- "pyproject.toml"
619

720
jobs:
821
lila:
@@ -16,18 +29,15 @@ jobs:
1629
image: ghcr.io/lichess-org/lila-docker:main
1730
options: --restart=always
1831
steps:
19-
- name: Setup Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v5
32+
- uses: actions/checkout@v4
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v6
2135
with:
2236
python-version: ${{ matrix.python-version }}
37+
- name: Install make and curl
38+
run: apt update && apt install -y make curl
2339
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
python -m pip install pytest
27-
- name: Install curl
28-
run: apt-get update && apt-get install -y curl
29-
- name: Checkout berserk
30-
uses: actions/checkout@v4
31-
- name: Run tests
40+
run: make setup
41+
- name: Run integration tests
3242
run: |
3343
./integration/run-tests.sh

integration/local.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ integration_test() {
55
local BDIT_IMAGE=ghcr.io/lichess-org/lila-docker:main
66
local BDIT_LILA=bdit_lila
77
local BDIT_NETWORK=bdit_lila-network
8+
local BDIT_APP_IMAGE=ghcr.io/astral-sh/uv:debian
89
local BDIT_APP=bdit_app
910

1011
cleanup_containers() {
@@ -18,7 +19,7 @@ integration_test() {
1819

1920
docker network create $BDIT_NETWORK
2021
docker run --name $BDIT_LILA --network $BDIT_NETWORK -d $BDIT_IMAGE
21-
docker run --name $BDIT_APP --network $BDIT_NETWORK -v "$(pwd)":/app -w /app $BDIT_IMAGE ./integration/run-tests.sh
22+
docker run --name $BDIT_APP --network $BDIT_NETWORK -v "$(pwd)":/app -w /app $BDIT_APP_IMAGE "./integration/run-tests.sh"
2223

2324
cleanup_containers
2425
echo "✅ Done"

integration/run-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -e
22

3-
python3 -m pip install -e . --no-cache-dir
3+
make setup # should this be moved outside of the file?
44

55
attempts=0
66
echo "🔍 Checking if lila is ready..."
@@ -13,4 +13,4 @@ while [ $attempts -lt 30 ]; do
1313
attempts=$((attempts + 1))
1414
done
1515

16-
pytest integration
16+
uv run pytest integration

0 commit comments

Comments
 (0)