-
Notifications
You must be signed in to change notification settings - Fork 10
89 lines (65 loc) · 2.63 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
php-unit:
name: Run PHPUnit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start the aurora
run: docker compose up -d --build
- name: Install dependencies
run: docker compose exec --user root php composer install
- name: Generate public/private keys for use in your application.
run: docker compose exec --user root php bin/console lexik:jwt:generate-keypair
- name: Give permissions for var
run: sudo chmod -R 777 var/
- name: Give permissions for assets/uploads
run: chmod -R 777 assets/uploads
- name: Create the phpunit.xml
run: docker compose exec --user root php cp phpunit.xml.dist phpunit.xml
- name: Run migrations
run: docker compose exec php bin/console d:m:migrate -n
- name: Run fixtures
run: docker compose exec php bin/console d:f:l -n --purge-exclusions=city --purge-exclusions=state
- name: Start the PHPUnit
run: docker compose exec php bin/paratest --no-coverage
cypress:
name: Run Cypress
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start the aurora
run: docker compose up -d --build
- name: Install application dependencies
run: docker compose exec --user root php composer install
- name: Generate public/private keys for use in your application.
run: docker compose exec --user root php bin/console lexik:jwt:generate-keypair
- name: Give permissions for var
run: sudo chmod -R 777 var/
- name: Create storage and give permissions
run: mkdir storage && chmod -R 777 storage
- name: Run generate mongodb proxies
run: docker compose exec --user root php bin/console doctrine:mongodb:generate:proxie
- name: Run migrations
run: docker compose exec --user root php bin/console d:m:migrate -n
- name: Run fixtures
run: docker compose exec --user root php bin/console d:f:l -n --purge-exclusions=city --purge-exclusions=state
- name: Install frontend dependencies
run: docker compose exec --user root php bin/console importmap:install
- name: Compile frontend dependencies
run: docker compose exec --user root php bin/console asset-map:compile
- name: Run cypress
run: docker compose run --rm cypress
- name: Upload cypress screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots
path: ./cypress/screenshots