deps(deps-dev): bump typescript-eslint in the lint-and-format group (… #546
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI / Docker Release | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
permissions: | |
contents: read | |
name: Lint Codebase | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run linter for code | |
run: pnpm run lint | |
- name: Run linter for documentation | |
run: pnpm run doc:lint | |
- name: Run license check (backend, production) | |
working-directory: apps/backend | |
run: pnpm dlx license-checker --production --onlyAllow "MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;0BSD;ISC" | |
- name: Run license check (client, production) | |
working-directory: apps/client | |
run: pnpm dlx license-checker --production --onlyAllow "MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;0BSD;ISC" | |
build-backend: | |
name: Build Backend | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
needs: [lint] | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run linter | |
run: pnpm run lint | |
- name: Build backend | |
run: pnpm --filter @eudiplo/backend build | |
build-client: | |
name: Build Client | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
needs: [lint] | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run linter | |
run: pnpm run lint | |
- name: Build client | |
run: pnpm --filter @eudiplo/client build | |
build-webhook: | |
name: Build Webhook | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
needs: [lint] | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run linter | |
run: pnpm run lint | |
- name: Build webhook | |
run: pnpm --filter test-rp build | |
build-doc: | |
name: Build Documentation | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
needs: [lint] | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run linter | |
run: pnpm run lint | |
- name: Set up Python | |
uses: actions/setup-python@v6 | |
with: | |
python-version: '3.11' | |
- name: Install Python dependencies | |
run: pip install -r requirements.txt | |
- name: Build documentation | |
run: pnpm run doc:generate && pnpm run compodoc && mkdocs build --strict | |
- name: Upload built documentation | |
uses: actions/upload-artifact@v4 | |
with: | |
name: generated-docs | |
path: site/ | |
test-e2e: | |
permissions: | |
contents: read | |
name: E2E Tests | |
runs-on: ubuntu-latest | |
needs: [build-backend, build-client, build-webhook] | |
steps: | |
- uses: actions/checkout@v5 | |
# - name: Add entry to /etc/hosts | |
# run: echo "127.0.0.1 host.testcontainers.internal" | sudo tee | |
# -a /etc/hosts | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run linter | |
run: pnpm run lint | |
- name: setup test webhooks | |
run: | | |
nohup pnpm --filter test-rp dev & | |
- name: Run E2E tests | |
run: pnpm run --filter @eudiplo/backend test:e2e | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage-e2e/coverage-final.json | |
flags: e2e-test | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
docker-backend: | |
name: Build & Push Backend Docker Image | |
needs: [test-e2e] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Build Backend Docker image | |
run: docker build -t ghcr.io/openwallet-foundation-labs/eudiplo:main --build-arg VERSION=main . --target eudiplo | |
# --- HEALTH TEST --- | |
- name: Run container (detached) | |
run: | | |
docker run -d --rm \ | |
--name eudiplo-test \ | |
-p 8080:8080 \ | |
ghcr.io/openwallet-foundation-labs/eudiplo:main | |
- name: Wait for healthy | |
run: | | |
set -e | |
# wait up to ~90s (45 * 2s) for HEALTHCHECK to pass | |
for i in $(seq 1 45); do | |
STATUS=$(docker inspect -f '{{if .State.Health}}{{.State.Health.Status}}{{else}}none{{end}}' eudiplo-test) | |
if [ "$STATUS" = "healthy" ]; then | |
echo "Container is healthy ✅" | |
exit 0 | |
fi | |
if [ "$STATUS" = "unhealthy" ]; then | |
echo "Container reported unhealthy ❌" | |
docker logs eudiplo-test || true | |
exit 1 | |
fi | |
sleep 2 | |
done | |
echo "Timed out waiting for healthy ❌" | |
docker ps | |
docker inspect eudiplo-test || true | |
docker logs eudiplo-test || true | |
exit 1 | |
- name: Stop test container | |
if: always() | |
run: docker stop eudiplo-test || true | |
- name: Log in to GitHub Container Registry | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Push Backend Docker image | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
run: docker push ghcr.io/openwallet-foundation-labs/eudiplo:main | |
docker-client: | |
name: Build & Push Client Docker Image | |
needs: [build-client] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Build Client Docker image | |
run: docker build -t ghcr.io/openwallet-foundation-labs/eudiplo-client:main . --target client | |
- name: Log in to GitHub Container Registry | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Push Client Docker image | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
run: docker push ghcr.io/openwallet-foundation-labs/eudiplo-client:main |