Add test-frontend, build-backend, and build-frontend stages to CI workflow
Some checks failed
Podman Rootless Demo / test-backend (push) Successful in 1m52s
Podman Rootless Demo / test-frontend (push) Successful in 11s
Podman Rootless Demo / build-backend (push) Failing after 15s
Podman Rootless Demo / build-frontend (push) Failing after 15s

This commit is contained in:
continuist 2025-09-20 12:43:38 -04:00
parent 28c89c6384
commit ff4fd327d1

View file

@ -123,4 +123,83 @@ jobs:
- name: Debug DB (on failure) - name: Debug DB (on failure)
if: failure() if: failure()
run: podman --remote logs --tail=200 test-postgres-${{ env.RUN_ID }} || true run: podman --remote logs --tail=200 test-postgres-${{ env.RUN_ID }} || true
test-frontend:
runs-on: [ci]
needs: test-backend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Pass-through (no frontend tests yet)
run: echo "Frontend tests placeholder - no tests implemented yet"
build-backend:
runs-on: [ci]
needs: [test-backend, test-frontend]
env:
CONTAINER_HOST: unix:///run/user/1001/podman/podman.sock
XDG_RUNTIME_DIR: /tmp
RUN_ID: ${{ github.run_id }}
BACKEND_IMAGE: ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}/sharenet-backend-api-postgres
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to container registry with PAT
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" | podman --remote login \
-u "${{ secrets.REGISTRY_USERNAME }}" \
--password-stdin \
"${{ secrets.REGISTRY_HOST }}"
- name: Build backend container image
run: |
podman --remote build \
-f backend/Dockerfile \
-t "$BACKEND_IMAGE:${{ github.sha }}" \
-t "$BACKEND_IMAGE:latest" \
backend
- name: Push backend container image
run: |
podman --remote push "$BACKEND_IMAGE:${{ github.sha }}"
podman --remote push "$BACKEND_IMAGE:latest"
build-frontend:
runs-on: [ci]
needs: [test-backend, test-frontend]
env:
CONTAINER_HOST: unix:///run/user/1001/podman/podman.sock
XDG_RUNTIME_DIR: /tmp
RUN_ID: ${{ github.run_id }}
FRONTEND_IMAGE: ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}/sharenet-frontend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to container registry with PAT
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" | podman --remote login \
-u "${{ secrets.REGISTRY_USERNAME }}" \
--password-stdin \
"${{ secrets.REGISTRY_HOST }}"
- name: Build frontend container image
run: |
podman --remote build \
-f frontend/Dockerfile \
-t "$FRONTEND_IMAGE:${{ github.sha }}" \
-t "$FRONTEND_IMAGE:latest" \
frontend
- name: Push frontend container image
run: |
podman --remote push "$FRONTEND_IMAGE:${{ github.sha }}"
podman --remote push "$FRONTEND_IMAGE:latest"