Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d2daf5a24 | |||
| 1a0da7d5ca | |||
| 79178fe51c |
54
.github/workflows/all_test3.yaml
vendored
54
.github/workflows/all_test3.yaml
vendored
@@ -12,7 +12,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: gpu
|
runs-on: ubuntu-22.04-v25.04.01
|
||||||
env:
|
env:
|
||||||
effective_tag: ${{ inputs.tag || github.head_ref || github.ref_name }}
|
effective_tag: ${{ inputs.tag || github.head_ref || github.ref_name }}
|
||||||
steps:
|
steps:
|
||||||
@@ -42,7 +42,10 @@ jobs:
|
|||||||
api_token: ${{ secrets.GITHUBTOKEN }}
|
api_token: ${{ secrets.GITHUBTOKEN }}
|
||||||
|
|
||||||
- name: Prepare prbot_data directory
|
- name: Prepare prbot_data directory
|
||||||
run: mkdir -p /home/runner/prbot_data && chmod -R 777 /home/runner/prbot_data
|
run: |
|
||||||
|
mkdir -p "${{ runner.temp }}/prbot_data"
|
||||||
|
echo "PRBOT_DATA=${{ runner.temp }}/prbot_data" >> $GITHUB_ENV
|
||||||
|
echo "Using PRBOT_DATA=${{ runner.temp }}/prbot_data"
|
||||||
|
|
||||||
- name: Sanitize tag
|
- name: Sanitize tag
|
||||||
run: |
|
run: |
|
||||||
@@ -69,6 +72,30 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker compose -f docker-compose-dev.yaml down || true
|
docker compose -f docker-compose-dev.yaml down || true
|
||||||
|
|
||||||
|
- name: Force remove old containers and network
|
||||||
|
run: |
|
||||||
|
docker ps --filter "network=hub-network" -aq | xargs -r docker rm -f || true
|
||||||
|
|
||||||
|
docker network rm hub-network || true
|
||||||
|
|
||||||
|
docker network ls
|
||||||
|
|
||||||
|
- name: Patch docker-compose-dev.yaml to set network MTU
|
||||||
|
run: |
|
||||||
|
echo "patching docker-compose-dev.yaml to set MTU=1400"
|
||||||
|
tmpfile=$(mktemp)
|
||||||
|
awk '
|
||||||
|
/driver: bridge/ {
|
||||||
|
print $0
|
||||||
|
print " driver_opts:"
|
||||||
|
print " com.docker.network.driver.mtu: 1400"
|
||||||
|
next
|
||||||
|
}
|
||||||
|
{ print $0 }
|
||||||
|
' docker-compose-dev.yaml > "$tmpfile"
|
||||||
|
mv "$tmpfile" docker-compose-dev.yaml
|
||||||
|
tail -n 10 docker-compose-dev.yaml
|
||||||
|
|
||||||
- name: Start docker-compose services
|
- name: Start docker-compose services
|
||||||
env:
|
env:
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
@@ -78,36 +105,33 @@ jobs:
|
|||||||
|
|
||||||
- name: Ruff format check (strict)
|
- name: Ruff format check (strict)
|
||||||
run: |
|
run: |
|
||||||
echo "Starting Ruff format check with tag: ${{ env.SANITIZED_TAG }}"
|
|
||||||
|
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v /home/runner/prbot_data:/tmp \
|
-v "${PRBOT_DATA}:/tmp" \
|
||||||
cr.yandex/crp8vh46gd976oq8ipla/${{ github.event.repository.name }}:${{ env.SANITIZED_TAG }} \
|
cr.yandex/crp8vh46gd976oq8ipla/${{ github.event.repository.name }}:${{ env.SANITIZED_TAG }} \
|
||||||
bash -c '
|
bash -c '
|
||||||
pip install ruff
|
pip install ruff
|
||||||
cd /server
|
cd /server
|
||||||
echo "=== Ruff format check ==="
|
echo "=== Ruff format check ==="
|
||||||
ruff format . --check
|
ruff format . --check
|
||||||
' \
|
' \
|
||||||
| tee /home/runner/prbot_data/full_output.txt | prbot
|
| tee "${PRBOT_DATA}/full_output.txt" | prbot
|
||||||
|
echo "=== Format Output ==="
|
||||||
echo "=== Format Output ==="
|
cat "${PRBOT_DATA}/full_output.txt"
|
||||||
cat /home/runner/prbot_data/full_output.txt
|
|
||||||
|
|
||||||
- name: Run Docker with output redirection
|
- name: Run Docker with output redirection
|
||||||
run: |
|
run: |
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v /home/runner/prbot_data:/tmp \
|
-v "${PRBOT_DATA}:/tmp" \
|
||||||
cr.yandex/crp8vh46gd976oq8ipla/${{ github.event.repository.name }}:${{ env.SANITIZED_TAG }} \
|
cr.yandex/crp8vh46gd976oq8ipla/${{ github.event.repository.name }}:${{ env.SANITIZED_TAG }} \
|
||||||
bash -c '
|
bash -c '
|
||||||
pip install ruff pytest pytest-github-actions-annotate-failures
|
pip install ruff pytest pytest-github-actions-annotate-failures
|
||||||
echo "=== Ruff ==="
|
echo "=== Ruff ==="
|
||||||
cd /server && ruff check . | sed "s|/server/||g" || true
|
cd /server && ruff check . | sed "s|/server/||g" || true
|
||||||
' \
|
' \
|
||||||
| tee /home/runner/prbot_data/full_output.txt | prbot
|
| tee "${PRBOT_DATA}/full_output.txt" | prbot
|
||||||
|
|
||||||
echo "=== Full Output ==="
|
echo "=== Full Output ==="
|
||||||
cat /home/runner/prbot_data/full_output.txt
|
cat "${PRBOT_DATA}/full_output.txt"
|
||||||
|
|
||||||
- name: Create database
|
- name: Create database
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user