This repository was archived by the owner on Dec 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
92 lines (73 loc) · 2.6 KB
/
Copy pathCI.yml
File metadata and controls
92 lines (73 loc) · 2.6 KB
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
90
91
92
name: CI
# Trigger the workflow on push and pill request
on:
pull_request:
push:
# Authenticate to the the server via ssh
# and run our deployment script
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.1']
env:
PHP_VERSION: ${{ matrix.php }}
name: PHP ${{ matrix.php }}
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bz2,xml,curl
env:
runner: ubuntu-18.04
- name: Install YouTube DLP
run: |
curl -Ls https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
chmod a+rx /usr/local/bin/yt-dlp
- name: Install FFMPEG
run: |
curl -Ls https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz | tar Jx -C /usr/local/bin --transform='s:.*/::' --wildcards '*/ffmpeg' '*/ffplay' '*/ffprobe'
chmod a+rx /usr/local/bin/ffmpeg
chmod a+rx /usr/local/bin/ffplay
chmod a+rx /usr/local/bin/ffprobe
- uses: actions/checkout@v2
- name: Validate composer
run: composer validate
- uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Composer install
run: composer install --prefer-dist --no-interaction
- name: NPM install
run: npm install
- name: Laravel Mix
run: npm run production
- name: Configure Laravel
run: |
php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan key:generate
- name: Test
run: php artisan test --coverage-clover=coverage.xml
- uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
env_vars: PHP_VERSION
fail_ci_if_error: true
dev-environment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate composer
run: composer validate
- uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Composer install
run: composer install --prefer-dist --no-interaction
- name: Build sail container
run: ./vendor/bin/sail build