feat: cr8s v0.4.6 compatibility with enhanced development workflow #39
Workflow file for this run
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 | |
on: | |
push: | |
branches: [ main, refactoring ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
run_e2e: | |
description: 'Run end-to-end tests?' | |
required: false | |
default: 'true' | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: Test and Build cr8s-fe | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
env: | |
CI: true | |
steps: | |
- name: ⬇️ Checkout repository | |
uses: actions/checkout@v4 | |
- name: 🐳 Log in to GitHub Container Registry | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
#- name: 🐳 Pre-pull base image to cache credentials | |
# run: docker pull ghcr.io/johnbasrai/cr8s/cr8s-server:0.4.3 | |
- name: 🚀 Run quickstart with full lint checks | |
run: ./scripts/quickstart.sh --full-lint | |
- name: 🧰 Set up Node.js for Playwright | |
if: github.event.inputs.run_e2e == 'true' || github.event_name != 'workflow_dispatch' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: 📦 Install NPM dependencies | |
if: github.event.inputs.run_e2e == 'true' || github.event_name != 'workflow_dispatch' | |
run: npm install | |
- name: 🎭 Install Playwright browsers | |
if: github.event.inputs.run_e2e == 'true' || github.event_name != 'workflow_dispatch' | |
run: npx playwright install --with-deps | |
- name: ⏳ Wait for frontend to be ready | |
run: npx wait-on http://localhost:8080 --timeout 60000 | |
- name: ✅ Run Playwright E2E tests (login only) | |
if: github.event.inputs.run_e2e == 'true' || github.event_name != 'workflow_dispatch' | |
run: npx playwright test tests/playwright/login.spec.ts | |
- name: 📋 Upload test results on failure | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
- name: 🛑 Cleanup services | |
if: always() | |
run: | | |
echo "🛑 Shutting down services..." | |
docker compose down -v || true |