Skip to content

feat(db): add dateCreated and lastModified to Repo #2624

feat(db): add dateCreated and lastModified to Repo

feat(db): add dateCreated and lastModified to Repo #2624

Workflow file for this run

name: E2E Tests
permissions:
contents: read
issues: write
pull-requests: write
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
e2e:
runs-on: ubuntu-latest
strategy:
matrix:
suite: [vitest, cypress]
env:
BUILDX_CACHE_SCOPE: ${{ matrix.suite }}-build
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c
with:
install: true
- name: Expose GitHub Runtime for Docker Cache
uses: crazy-max/ghaction-github-runtime@04d248b84655b509d8c44dc1d6f990c879747487 # v4.0.0
- name: Set up Docker Compose
uses: docker/setup-compose-action@3408803818f5b5065308cdf3293ecbddf1ab2fac
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v6
with:
node-version: '24'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Configure Git for CI
run: |
git config --global user.name "CI Runner"
git config --global user.email "ci@example.com"
git config --global init.defaultBranch main
- name: Build and start services with Docker Compose
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d --build --wait
- name: Debug service state
if: failure()
run: |
docker compose ps
docker compose logs
- name: Run vitest E2E tests
if: matrix.suite == 'vitest'
run: npm run test:e2e
- name: Run Cypress E2E tests
if: matrix.suite == 'cypress'
run: npm run cypress:run:docker
timeout-minutes: 10
env:
CYPRESS_BASE_URL: http://localhost:8081
CYPRESS_API_BASE_URL: http://localhost:8081
CYPRESS_GIT_PROXY_URL: http://localhost:8000
CYPRESS_GIT_SERVER_TARGET: git-server:8443
- name: Dump git-proxy logs on failure
if: failure()
run: docker compose logs git-proxy --tail=100
- name: Upload Cypress screenshots on failure
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: failure() && matrix.suite == 'cypress'
with:
name: cypress-screenshots
path: cypress/screenshots
retention-days: 7
- name: Stop services
if: always()
run: docker compose down -v
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: e2e
needs: [e2e]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- name: Check e2e results
run: |
result="${{ needs.e2e.result }}"
if [[ "$result" == "success" || "$result" == "skipped" ]]; then
exit 0
else
exit 1
fi