Skip to content

Commit

Permalink
chore(ci): drop unit testing
Browse files Browse the repository at this point in the history
- the wheel no longer includes test dependencies
- we might eventually discard even the test data
- faster publishing of docker image
  • Loading branch information
nijel committed Nov 5, 2024
1 parent 29a0403 commit 59b4bde
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 104 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/bleeding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,56 +83,6 @@ jobs:
- name: Build the Docker image
run: .github/bin/docker-build

test:
runs-on: ubuntu-24.04
name: Test, bleeding
needs:
- bleeding
- build
env:
MATRIX_ARCHITECTURE: linux/amd64
COMPOSE_PROJECT_NAME: wl
PYTHONUNBUFFERED: 1
TEST_CONTAINER: weblate/weblate:test
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
# renovate: datasource=github-releases depName=docker/buildx
version: v0.18.0
- name: Adjust bleeding edge image
run: .github/bin/bleeding ${{needs.bleeding.outputs.weblate_sha}} ${{needs.bleeding.outputs.weblate_date}}
- name: Build the Docker image
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
run: |
cd docker-compose
./test-generate
- name: Startup container
run: |
cd docker-compose
./test-boot
- name: Run tests
run: |
cd docker-compose
./test-tests
- name: Display logs
if: always()
run: |
cd docker-compose
./test-logs
- name: Shutdown service
run: |
cd docker-compose
./test-stop
test-basic:
runs-on: ubuntu-24.04
name: Test basic, bleeding
Expand Down Expand Up @@ -745,7 +695,6 @@ jobs:
runs-on: ubuntu-24.04
name: Publish to Docker Hub, stable
needs:
- test
- test-basic
- test-saml
- test-split
Expand Down Expand Up @@ -787,7 +736,6 @@ jobs:
permissions:
packages: write
needs:
- test
- test-basic
- test-saml
- test-split
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,53 +65,6 @@ jobs:
- name: Build the Docker image
run: .github/bin/docker-build

test:
runs-on: ubuntu-24.04
name: Test, stable
needs:
- build
env:
MATRIX_ARCHITECTURE: linux/amd64
COMPOSE_PROJECT_NAME: wl
PYTHONUNBUFFERED: 1
TEST_CONTAINER: weblate/weblate:test
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
# renovate: datasource=github-releases depName=docker/buildx
version: v0.18.0
- name: Build the Docker image
run: .github/bin/docker-build load
- name: List Docker images
run: docker image ls --all
- name: Generate configuration
run: |
cd docker-compose
./test-generate
- name: Startup container
run: |
cd docker-compose
./test-boot
- name: Run tests
run: |
cd docker-compose
./test-tests
- name: Display logs
if: always()
run: |
cd docker-compose
./test-logs
- name: Shutdown service
run: |
cd docker-compose
./test-stop
test-basic:
runs-on: ubuntu-24.04
name: Test basic, stable
Expand Down Expand Up @@ -697,7 +650,6 @@ jobs:
runs-on: ubuntu-24.04
name: Publish to Docker Hub, stable
needs:
- test
- test-basic
- test-saml
- test-split
Expand Down Expand Up @@ -736,7 +688,6 @@ jobs:
permissions:
packages: write
needs:
- test
- test-basic
- test-saml
- test-split
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.12.7-slim-bookworm
ENV PYVERSION=3.12
ENV WEBLATE_VERSION=5.8.2
ENV WEBLATE_EXTRAS=all,MySQL,zxcvbn,test
ENV WEBLATE_EXTRAS=all,MySQL,zxcvbn
ARG TARGETARCH

LABEL name="Weblate"
Expand Down Expand Up @@ -185,9 +185,7 @@ RUN rm -f /etc/localtime /etc/timezone \

# Customize Python:
# - Search path for custom modules
# - Create test and app data dirs to be able to run tests
RUN \
install -d -o weblate -g weblate -m 755 "/app/venv/lib/python${PYVERSION}/site-packages/data-test" "/app/venv/lib/python${PYVERSION}/site-packages/test-images" && \
echo "/app/data/python" > "/app/venv/lib/python${PYVERSION}/site-packages/weblate-docker.pth" && \
mkdir -p /app/data/python/customize && \
touch /app/data/python/customize/__init__.py && \
Expand Down

0 comments on commit 59b4bde

Please sign in to comment.