Skip to content

Commit 7d073e4

Browse files
fix(front): Make sure that default template is language agnostic (#63)
1 parent 8d104c5 commit 7d073e4

File tree

3 files changed

+134
-1
lines changed

3 files changed

+134
-1
lines changed

front/assets/js/project_onboarding/new/pages/workflow_setup/starter_workflow_template.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const StarterWorkflowTemplate = () => {
6363
const groups = state.templatesSetup?.groups || [];
6464
const [activeFilters, setActiveFilters] = useState<Record<string, string[]>>({});
6565
const [searchQuery, setSearchQuery] = useState(``);
66-
const [selectedTemplate, setSelectedTemplate] = useState<Templates.Template>(state.templates.find(t => t.title.includes(`Fan-in`)) || state.templates[0]);
66+
const [selectedTemplate, setSelectedTemplate] = useState<Templates.Template>(state.templates.find(t => t.title.includes(`Fan-In`)) || state.templates[0]);
6767
const [isLoading, setIsLoading] = useState(false);
6868

6969
useEffect(() => {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"title": "RSpec",
3+
"description": "Run parallel RSpec tests in Docker with PostgreSQL and Redis support. Uses Knapsack for test distribution. <div class='flex items-center mt1 mb3'><span class='f6 normal mr1 ph1 br2 bg-red white'>Ruby</span><span class='f6 normal mr1 ph1 br2 bg-green white'>Docker</span><span class='f6 normal mr1 ph1 br2 bg-purple white'>RSpec</span><span class='f6 normal mr1 ph1 br2 bg-blue white'>Knapsack</span></div>",
4+
"short_description": "Run your Ruby RSpec suite",
5+
"group": "ci",
6+
"language": "Ruby",
7+
"environment": "docker",
8+
"use_case": "ci_pipeline",
9+
"icon": "lang-ruby.svg",
10+
"template_path": "templates/rspec_docker.yml",
11+
"workflow_tip": "none"
12+
}
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# This is a Semaphore configuration file for Laravel projects using Docker
2+
# For more information about Semaphore configuration visit:
3+
# https://docs.semaphoreci.com/reference/pipeline-yaml-reference/
4+
5+
version: v1.0 # Semaphore configuration version
6+
name: "🚀 Laravel CI Pipeline" # Pipeline display name
7+
8+
# Define the machine type, OS image, and containers
9+
agent:
10+
machine:
11+
type: {{ machine_type }}
12+
os_image: {{ os_image }}
13+
14+
containers:
15+
- name: main
16+
image: 'registry.semaphoreci.com/php:8.3-apache' # PHP 8.3 with Apache
17+
- name: postgres
18+
image: 'registry.semaphoreci.com/postgres:17' # PostgreSQL 17 for database operations
19+
- name: redis
20+
image: 'registry.semaphoreci.com/redis:7.0' # Redis 7.0 for caching
21+
22+
# Configure when to stop the pipeline early
23+
fail_fast:
24+
stop:
25+
when: branch != 'main' # Stop all blocks if a job fails on non-main branches
26+
auto_cancel:
27+
running:
28+
when: branch != 'main' # Cancel running pipelines on non-main branches
29+
queued:
30+
when: branch = 'main' # Cancel queued pipelines on main branch
31+
32+
# Commands to run before each job
33+
global_job_config:
34+
prologue:
35+
commands:
36+
- checkout # Get the code from repository
37+
- cache restore # Restore cached dependencies
38+
- composer install # Install PHP dependencies
39+
- npm ci # Install Node.js dependencies
40+
41+
# Pipeline blocks represent groups of jobs that can run in parallel
42+
blocks:
43+
# Block for setting up dependencies and caching
44+
- name: "🛠 Setup and Cache"
45+
dependencies: []
46+
task:
47+
jobs:
48+
- name: Install Dependencies
49+
commands:
50+
- cache store # Cache dependencies for future runs
51+
52+
# Block for asset compilation
53+
- name: "🎨 Assets"
54+
dependencies: ["🛠 Setup and Cache"]
55+
task:
56+
jobs:
57+
- name: Compile Assets
58+
commands:
59+
- npm run build # Build frontend assets
60+
61+
# Block for code quality checks
62+
- name: "🔍 Code Quality"
63+
dependencies: ["🛠 Setup and Cache"]
64+
task:
65+
jobs:
66+
- name: Lint and Format
67+
commands:
68+
- ./vendor/bin/pint --test # Check code style
69+
- ./vendor/bin/phpstan analyze # Static analysis
70+
- npm run lint # Check JavaScript code
71+
72+
# Block for security checks
73+
- name: "🔐 Security Checks"
74+
dependencies: ["🛠 Setup and Cache"]
75+
task:
76+
jobs:
77+
- name: Security Scan
78+
commands:
79+
- composer audit # Check PHP dependencies
80+
- npm audit # Check Node.js dependencies
81+
82+
# Block for running tests
83+
- name: "🧪 Test Suite"
84+
dependencies: ["🛠 Setup and Cache"]
85+
task:
86+
env_vars:
87+
- name: APP_ENV
88+
value: testing
89+
- name: DB_CONNECTION
90+
value: pgsql
91+
- name: DB_HOST
92+
value: postgres # PostgreSQL container name
93+
- name: REDIS_HOST
94+
value: redis # Redis container name
95+
jobs:
96+
- name: "🟢 PHPUnit Tests"
97+
parallelism: 4 # Run tests in parallel
98+
commands:
99+
- php artisan test --parallel --coverage-clover=report.xml # Run tests with coverage and generate JUnit report
100+
epilogue:
101+
always:
102+
commands:
103+
- '[[ -f report.xml ]] && test-results publish report.xml' # Publish test results if available
104+
105+
# Block for browser tests
106+
- name: "🌐 Browser Tests"
107+
dependencies: ["🧪 Test Suite"]
108+
task:
109+
jobs:
110+
- name: Dusk Tests
111+
commands:
112+
- php artisan dusk:chrome-driver # Install Chrome driver
113+
- php artisan serve & sleep 5 # Start test server
114+
- php artisan dusk # Run browser tests
115+
116+
after_pipeline:
117+
task:
118+
jobs:
119+
- name: "Merge Reports 📊"
120+
commands:
121+
- test-results gen-pipeline-report # Generate a summary of the test results

0 commit comments

Comments
 (0)