Skip to content

Commit d2bc617

Browse files
CI Generator (#2)
1 parent 3a46e6f commit d2bc617

File tree

4 files changed

+62
-7695
lines changed

4 files changed

+62
-7695
lines changed

.github/workflows/lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Lint
2+
on:
3+
- push
4+
jobs:
5+
lint:
6+
name: Lint
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
- name: Setup PHP
12+
uses: shivammathur/setup-php@v2
13+
with:
14+
php-version: '8.0'
15+
tools: phplint, laravel/pint
16+
- name: Check syntax
17+
run: phplint .
18+
- name: Check code style
19+
run: pint --test

.github/workflows/test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Test
2+
on:
3+
- push
4+
jobs:
5+
test:
6+
strategy:
7+
matrix:
8+
operating-system:
9+
- ubuntu-latest
10+
php-version:
11+
- '8.0'
12+
- '8.1'
13+
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }}
14+
runs-on: ${{ matrix.operating-system }}
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-version }}
22+
extensions: bcmath, ctype, fileinfo, json, mbstring, openssl, pdo, tokenizer, xml
23+
coverage: none
24+
- name: Prepare the environment
25+
run: cp .env.example .env
26+
- name: Get composer cache directory
27+
id: composer-cache
28+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
29+
- name: Setup composer cache
30+
uses: actions/cache@v2
31+
with:
32+
path: ${{ steps.composer-cache.outputs.dir }}
33+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
34+
restore-keys: ${{ runner.os }}-composer-
35+
- name: Install composer dependencies
36+
env:
37+
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
38+
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
39+
- name: Generate application key
40+
run: php artisan key:generate
41+
- name: Run tests
42+
run: php artisan test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ npm-debug.log
1414
yarn-error.log
1515
/.idea
1616
/.vscode
17+
composer.lock

0 commit comments

Comments
 (0)