-
-
Notifications
You must be signed in to change notification settings - Fork 59
38 lines (29 loc) · 1.21 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
name: Tests
on:
push:
branches:
- 'develop'
- '3.0-develop'
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create environment file
run: cp .env.ci .env
- name: Start Docker Containers
run: docker compose -f docker-compose.ci.yml up -d
- name: Install Composer dependencies
run: docker compose -f docker-compose.ci.yml exec workspace composer install --prefer-dist --no-interaction --no-progress
- name: Install NPM dependencies
run: docker compose -f docker-compose.ci.yml exec workspace npm install
- name: Build frontend assets
run: docker compose -f docker-compose.ci.yml exec workspace npm run build
- name: Run database migrations
run: docker compose -f docker-compose.ci.yml exec workspace php artisan migrate
- name: Run feature tests
run: docker compose -f docker-compose.ci.yml exec workspace vendor/bin/pest --bootstrap vendor/autoload.php tests/Feature
- name: Run unit tests
run: docker compose -f docker-compose.ci.yml exec workspace vendor/bin/pest --bootstrap vendor/autoload.php tests/Unit