Skip to content

Commit

Permalink
adds workflows for type checking and automated asset compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
austintoddj committed Mar 9, 2023
1 parent 70a46aa commit 8608535
Show file tree
Hide file tree
Showing 7 changed files with 159 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
.workspace.json export-ignore
Dockerfile export-ignore
phpunit.xml.dist export-ignore
phpstan.neon.dist export-ignore
7 changes: 7 additions & 0 deletions .github/workflows/compile-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: compile assets

on: [push]

jobs:
compile:
uses: laravel/.github/.github/workflows/compile-assets.yml@main
37 changes: 37 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: static analysis

on:
push:
branches:
- '*'
pull_request:

permissions:
contents: read

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
name: Static Analysis
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none

- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress

- name: Execute type checking
run: vendor/bin/phpstan
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"require-dev": {
"mockery/mockery": "^1.4",
"orchestra/testbench": "^7.0|^8.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.0"
},
"autoload": {
Expand Down
131 changes: 95 additions & 36 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"private": true,
"scripts": {
"dev": "mix",
"prod": "mix --production",
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production",
"format": "prettier --write resources \"**/*.{css,scss,js,json,vue}\"",
"lint": "eslint --ext .js,.vue --fix resources/js"
},
Expand Down
12 changes: 12 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
parameters:
paths:
- config
- database
- src
- routes
- lang

level: 0

ignoreErrors:
- "#Unsafe usage of new static\\(\\)#"

0 comments on commit 8608535

Please sign in to comment.