Skip to content

Commit e5ce560

Browse files
committed
Update Semaphore configuration
1 parent c0505f9 commit e5ce560

1 file changed

Lines changed: 28 additions & 25 deletions

File tree

.semaphore/semaphore.yml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ agent:
44
machine:
55
type: e1-standard-2
66
os_image: ubuntu2004
7-
containers:
8-
- name: main
9-
image: 'registry.semaphoreci.com/php:8.3-apache'
10-
- name: postgres
11-
image: 'registry.semaphoreci.com/postgres:17'
12-
- name: redis
13-
image: 'registry.semaphoreci.com/redis:7.0'
147
fail_fast:
158
stop:
169
when: branch != 'main'
@@ -23,61 +16,71 @@ global_job_config:
2316
prologue:
2417
commands:
2518
- checkout
19+
- sem-service start mysql 8.0
20+
- sem-service start redis 7
21+
- sem-version php 8.3
22+
- sem-version node 20.11.0
2623
- cache restore
27-
- composer install
24+
- 'composer config -g github-oauth.github.com ${GITHUB_TOKEN}'
25+
- composer install --no-interaction --prefer-dist
2826
- npm ci
27+
- cp .env.example .env
28+
- 'php artisan key:generate'
2929
blocks:
30-
- name: "\U0001F6E0 Setup and Cache"
30+
- name: "\U0001F6E0 Setup and Cache"
3131
dependencies: []
3232
task:
3333
jobs:
34-
- name: Install Dependencies
34+
- name: Cache Dependencies
3535
commands:
3636
- cache store
37-
- name: "\U0001F3A8 Assets"
37+
- name: "\U0001F3A8 Compile Assets"
3838
dependencies:
39-
- "\U0001F6E0 Setup and Cache"
39+
- "\U0001F6E0 Setup and Cache"
4040
task:
4141
jobs:
42-
- name: Compile Assets
42+
- name: Build Frontend Assets
4343
commands:
4444
- npm run build
4545
- name: "\U0001F50D Code Quality"
4646
dependencies:
47-
- "\U0001F6E0 Setup and Cache"
47+
- "\U0001F6E0 Setup and Cache"
4848
task:
4949
jobs:
50-
- name: Lint and Format
50+
- name: Lint and Format Code
5151
commands:
5252
- ./vendor/bin/pint --test
53-
- ./vendor/bin/phpstan analyze
53+
- ./vendor/bin/phpstan analyse
5454
- npm run lint
5555
- name: "\U0001F510 Security Checks"
5656
dependencies:
57-
- "\U0001F6E0 Setup and Cache"
57+
- "\U0001F6E0 Setup and Cache"
5858
task:
5959
jobs:
60-
- name: Security Scan
60+
- name: Run Security Audits
6161
commands:
6262
- composer audit
6363
- npm audit
6464
- name: "\U0001F9EA Test Suite"
6565
dependencies:
66-
- "\U0001F6E0 Setup and Cache"
66+
- "\U0001F6E0 Setup and Cache"
6767
task:
6868
env_vars:
6969
- name: APP_ENV
7070
value: testing
7171
- name: DB_CONNECTION
72-
value: pgsql
72+
value: mysql
7373
- name: DB_HOST
74-
value: postgres
74+
value: 127.0.0.1
75+
- name: DB_PORT
76+
value: '3306'
7577
- name: REDIS_HOST
76-
value: redis
78+
value: 127.0.0.1
7779
jobs:
78-
- name: "\U0001F7E2 PHPUnit Tests"
80+
- name: "\U0001F7E2 Run PHPUnit Tests"
7981
parallelism: 4
8082
commands:
83+
- 'php artisan migrate:fresh --seed'
8184
- php artisan test --parallel --coverage-clover=report.xml
8285
epilogue:
8386
always:
@@ -88,10 +91,10 @@ blocks:
8891
- "\U0001F9EA Test Suite"
8992
task:
9093
jobs:
91-
- name: Dusk Tests
94+
- name: Run Dusk Tests
9295
commands:
9396
- 'php artisan dusk:chrome-driver'
94-
- php artisan serve & sleep 5
97+
- php artisan serve --env=dusk.testing &
9598
- php artisan dusk
9699
after_pipeline:
97100
task:

0 commit comments

Comments
 (0)