Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions .github/workflows/frontend.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,53 @@
name: Frontend CI

name: CI
on:
push:
pull_request:

concurrency:
group: frontend-ci-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
name: Jest on Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [18, 20] # LTS + current used in repo

node: [18, 20, 22]
env:
CI: "1"
EXPO_TUNNEL: "false"
EXPO_DEVTOOLS_LISTEN_ADDRESS: 0.0.0.0
EXPO_PUBLIC_API_BASE: http://localhost:8000

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: frontend/app/package-lock.json

- name: Install deps
working-directory: frontend/app
run: npm ci

- name: Type check (skip if no TS)
if: hashFiles('frontend/app/tsconfig.json') != ''
working-directory: frontend/app
run: |
npx --yes typescript@latest -v >/dev/null 2>&1 || true
npx tsc --noEmit || (echo "::warning::Type check failed"; exit 1)

- name: Run Jest with coverage (CI mode)
working-directory: frontend/app
run: npm test -- --ci --runInBand --coverage --verbose

- name: Upload coverage
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-node${{ matrix.node }}
path: frontend/app/coverage
if-no-files-found: warn

web-export-smoke:
name: Expo web export (smoke)
needs: test
Expand All @@ -69,22 +57,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend/app/package-lock.json

- name: Install deps
working-directory: frontend/app
run: npm ci

- name: Build (expo export -p web)
working-directory: frontend/app
run: npx expo export -p web

- name: Upload dist (preview artifact)
if: always()
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Expo Web to GitHub Pages
name: GitHub Pages
on:
push:
branches: [ "main" ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Frontend Tests via Docker
name: docker
on:
workflow_dispatch:
pull_request:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# [Python Front](https://github.com/europanite/python_front "Python Front")

[![CI](https://github.com/europanite/python_front/actions/workflows/ci.yml/badge.svg)](https://github.com/europanite/python_front/actions/workflows/ci.yml)
[![Frontend Tests via Docker](https://github.com/europanite/python_front/actions/workflows/docker.yml/badge.svg)](https://github.com/europanite/python_front/actions/workflows/docker.yml)
[![Deploy Expo Web to GitHub Pages](https://github.com/europanite/python_front/actions/workflows/deploy-pages.yml/badge.svg)](https://github.com/europanite/python_front/actions/workflows/deploy-pages.yml)

A browser based Python playground.

!["web_ui"](./assets/images/web_ui.png)
Expand Down
Loading