-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jetstream Install and Initial Setup/Config
Signed-off-by: Nuno Souto <[email protected]>
- Loading branch information
Showing
184 changed files
with
38,526 additions
and
4,620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
workflow_dispatch: | ||
|
||
jobs: | ||
linters-tlint: | ||
name: Linters | ||
uses: lostlink/envmanager/.github/workflows/tlint.yml@main | ||
linters-phpcs: | ||
name: Linters | ||
uses: lostlink/envmanager/.github/workflows/phpcs.yml@main | ||
linters-phpstan: | ||
name: Linters | ||
uses: lostlink/envmanager/.github/workflows/phpstan.yml@main | ||
secrets: | ||
VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }} | ||
test: | ||
name: Test | ||
uses: lostlink/envmanager/.github/workflows/test.yml@main | ||
deploy: | ||
name: Deploy to Vapor | ||
runs-on: ubuntu-latest | ||
needs: [linters-tlint,linters-phpcs,linters-phpstan,test] | ||
concurrency: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
env: | ||
APP_ENV: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_REGION != null && secrets.AWS_REGION || 'us-east-1' }} | ||
|
||
- name: Start Redis | ||
uses: supercharge/[email protected] | ||
with: | ||
redis-version: 6 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: npm | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0.13 | ||
extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, gmp | ||
coverage: none | ||
|
||
- name: Install Composer dependencies | ||
run: composer install --prefer-dist --no-interaction --no-progress --no-scripts | ||
|
||
# - name: Update .env | ||
# run: | | ||
# echo '${{ secrets[format('ENVAULT_{0}', env.APP_ENV)] }}' > .envault.json | ||
# npx envault --filename=.env.${{ env.APP_ENV }} --force | ||
# ./vendor/bin/vapor env:push ${{ env.APP_ENV }} -q | ||
# env: | ||
# VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }} | ||
|
||
- name: Deploy code | ||
run: ./vendor/bin/vapor deploy ${{ env.APP_ENV }} --commit="${{ github.sha }}" | ||
env: | ||
VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: Logs | ||
path: ./storage/logs | ||
|
||
- name: Create Sentry release | ||
uses: getsentry/action-release@v1 | ||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | ||
with: | ||
environment: ${{ env.APP_ENV }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Linters - PHPCS | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/* | ||
- hotfix/* | ||
workflow_call: | ||
|
||
jobs: | ||
phpcs: | ||
name: PHPCS | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
env: | ||
APP_ENV: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0.8 | ||
extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction --no-progress --no-scripts --ignore-platform-reqs | ||
|
||
- name: PHPCS lint | ||
run: vendor/bin/duster phpcs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Linters - PHPStan | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/* | ||
- hotfix/* | ||
workflow_call: | ||
secrets: | ||
VAPOR_API_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
phpstan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
env: | ||
APP_ENV: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0.8 | ||
extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction --no-progress --no-scripts --ignore-platform-reqs | ||
|
||
- name: Update .env | ||
run: | | ||
./vendor/bin/vapor env:pull ${{ env.APP_ENV }} -q | ||
cp .env.${{ env.APP_ENV }} .env | ||
env: | ||
VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }} | ||
|
||
- name: PHPStan Analyze | ||
run: vendor/bin/phpstan analyze |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/* | ||
- hotfix/* | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
env: | ||
APP_ENV: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: npm | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0.8 | ||
extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
|
||
- name: Validate Composer | ||
run: composer validate | ||
|
||
- name: Install Composer dependencies | ||
run: composer install --prefer-dist --no-interaction --no-progress --no-scripts | ||
|
||
- name: Copy testing environment config file | ||
run: php -r "file_exists('.env') || copy('.env.testing', '.env');" | ||
|
||
- name: Copy example environment config file | ||
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | ||
|
||
- name: Generate Laravel encryption key | ||
run: php artisan key:generate | ||
|
||
- name: Prepare Frontend Assets | ||
run: npm ci && npm run prod | ||
|
||
- name: Run Tests | ||
run: ./vendor/bin/pest | ||
env: | ||
APP_ENV: testing | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: Logs | ||
path: ./storage/logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Linters - TLint | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/* | ||
- hotfix/* | ||
workflow_call: | ||
|
||
jobs: | ||
tlint: | ||
name: TLint | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
env: | ||
APP_ENV: ${{ github.ref == 'refs/heads/main' && 'production' || 'develop' }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0.8 | ||
extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction --no-progress --no-scripts --ignore-platform-reqs | ||
|
||
- name: Tlint Lint | ||
run: vendor/bin/duster tlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
/node_modules | ||
/public/hot | ||
/public/storage | ||
/storage/*.key | ||
/vendor | ||
.env | ||
.env.backup | ||
.env.* | ||
.idea | ||
.vapor/ | ||
.DS_Store | ||
.blueprint | ||
.phpstorm.meta.php | ||
.php-cs-fixer.cache | ||
.phpunit.result.cache | ||
docker-compose.override.yml | ||
Homestead.json | ||
Homestead.yaml | ||
storage/* | ||
cghooks.lock | ||
geoip.tar.gz | ||
npm-debug.log | ||
yarn-error.log | ||
/.idea | ||
/.vscode | ||
_ide_helper.php | ||
/vendor | ||
/public/* | ||
/_scratch/ | ||
/draft.yaml | ||
/node_modules | ||
/storage/*.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
php: | ||
preset: laravel | ||
version: 8 | ||
disabled: | ||
- no_unused_imports | ||
finder: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "stylelint-config-standard", | ||
"rules": { | ||
"indentation": 4, | ||
"at-rule-no-unknown": [ true, { | ||
"ignoreAtRules": [ | ||
"tailwind" | ||
] | ||
}], | ||
"no-eol-whitespace": [ true, { | ||
"ignore": ["empty-lines"] | ||
}] | ||
} | ||
} |
Oops, something went wrong.