Skip to content

Commit

Permalink
Configure testing pipeline (and remove admin ui build)
Browse files Browse the repository at this point in the history
- Temporarily disable docker builds and pushes
- Disable Codecov (at least for now)
  • Loading branch information
ttuovinen committed Jan 19, 2024
1 parent f8f1795 commit 6d2e561
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 97 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11"]
module: [Api, Core]

# We want to run on external PRs, but not on our own internal PRs as they'll be run
Expand Down Expand Up @@ -56,6 +56,7 @@ jobs:
MODULE: ${{ matrix.module }}

- name: Upload coverage to Codecov
if: false # Disable temporarily
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -84,7 +85,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"

- name: Install Apt Packages
run: |
Expand All @@ -104,6 +105,7 @@ jobs:
run: tox -e "migration-docker"

- name: Upload coverage to Codecov
if: false # Disable temporarily
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -119,7 +121,8 @@ jobs:

# Only build docker containers on a push event. Otherwise, we won't have
# permissions to push the built containers into registry.
if: github.event_name == 'push'
# if: github.event_name == 'push'
if: false # Disable temporarily

outputs:
baseimage-changed: ${{ steps.changes.outputs.baseimage }}
Expand Down Expand Up @@ -231,6 +234,7 @@ jobs:
BASE_IMAGE=${{ steps.baseimage.outputs.tag }}
docker-image-test:
if: false # Disable temporarily
name: Docker test circ-${{ matrix.image }} (${{ matrix.platform }})
runs-on: ubuntu-latest
needs: [docker-image-build]
Expand Down Expand Up @@ -301,6 +305,7 @@ jobs:
run: docker stop test_container

docker-image-push:
if: false # Disable temporarily
name: Push circ-${{ matrix.image }}
runs-on: ubuntu-latest
needs: [test, test-migrations, docker-image-build, docker-image-test]
Expand Down Expand Up @@ -331,7 +336,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"

- name: Install Poetry
uses: ./.github/actions/poetry
Expand Down
4 changes: 3 additions & 1 deletion api/admin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class OperationalMode(str, Enum):

class Configuration(LoggerMixin):
APP_NAME = "E-kirjasto Collection Manager"
PACKAGE_NAME = "@natlibfi/ekirjasto-circulation-admin"
# PACKAGE_NAME = "@natlibfi/ekirjasto-circulation-admin"
# PACKAGE_VERSION = "0.0.1"
PACKAGE_NAME = "@thepalaceproject/circulation-admin"
PACKAGE_VERSION = "1.11.0"

STATIC_ASSETS = {
Expand Down
10 changes: 1 addition & 9 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,13 @@ ENV TZ=Europe/Helsinki

# Setup nginx
COPY docker/services/nginx /etc/nginx/
COPY docker/admin_dist.tar.gz /mnt/admin_dist.tar.gz

# Setup uwsgi
COPY docker/services/uwsgi /etc/
RUN mkdir -p /var/log/uwsgi && \
chown -RHh simplified:simplified /var/log/uwsgi && \
mkdir /var/run/uwsgi && \
chown simplified:simplified /var/run/uwsgi && \
cd /var/www/circulation/api/admin && \
tar xf /mnt/admin_dist.tar.gz && \
chown -R simplified:simplified dist && \
rm /mnt/admin_dist.tar.gz

COPY --chown=simplified:simplified docker/config.py_admin /var/www/circulation/api/admin/config.py
chown simplified:simplified /var/run/uwsgi

# Setup runit
COPY docker/runit /etc/service/
Expand All @@ -89,4 +82,3 @@ WORKDIR /home/simplified/circulation
EXPOSE 80

CMD ["/sbin/my_init"]

83 changes: 0 additions & 83 deletions docker/Dockerfile.admin

This file was deleted.

0 comments on commit 6d2e561

Please sign in to comment.