Skip to content

Upgrade laravel to v11. #65

Upgrade laravel to v11.

Upgrade laravel to v11. #65

Workflow file for this run

name: CI
on:
pull_request:
branches: [ master ]
# push:
# branches:
# - master
permissions:
contents: 'read'
packages: 'write'
jobs:
composer-validate:
runs-on: ubuntu-20.04
name: "Composer Validate"
steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
- name: 'Validate composer.json'
run: composer validate --no-check-all --strict --no-check-lock
composer-install:
needs: composer-validate
runs-on: ubuntu-20.04
name: "Composer Install"
steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
ini-values: memory_limit=-1
coverage: none
tools: composer:v2
extensions: grpc
- name: 'Install Dependencies'
run: composer install --prefer-dist --no-progress --no-interaction
# code-style:
# needs: composer-install
# runs-on: ubuntu-latest
# name: "Code Style"
# strategy:
# fail-fast: false
# steps:
# - name: 'Checkout Code'
# uses: actions/checkout@v2
#
# - name: 'Setup PHP'
# uses: shivammathur/setup-php@v2
# with:
# php-version: 8.1
# ini-values: memory_limit=-1
# coverage: none
# tools: composer:v2
# extensions: grpc
#
# - name: 'Install PHP dependencies with Composer'
# run: composer install --prefer-dist --no-progress --optimize-autoloader
# working-directory: './'
#
# - name: 'Run CodeSniffer'
# run: ./vendor/bin/phpcs ./ -p --encoding=utf-8 --extensions=php --ignore="vendor|Tests" --standard=./vendor/escapestudios/symfony2-coding-standard/Symfony
static-analysis:
needs: composer-install
runs-on: ubuntu-latest
name: "Static Analysis"
strategy:
fail-fast: false
steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
ini-values: memory_limit=-1
coverage: none
tools: composer:v2
extensions: grpc
- name: 'Install PHP dependencies with Composer'
run: composer install --prefer-dist --no-progress --optimize-autoloader
working-directory: './'
- name: 'Run PHPStan'
run: ./vendor/bin/phpstan analyse --memory-limit=2G --no-progress -c phpstan.neon ./
test:
needs: composer-install
runs-on: ubuntu-latest
name: "Test Backend"
steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
ini-values: memory_limit=-1
coverage: none
tools: composer:v2
extensions: grpc
- name: 'Install PHP dependencies with Composer'
run: composer install --prefer-dist --no-progress --optimize-autoloader
working-directory: './'
- name: 'Create Database'
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php artisan test
test-fe:
runs-on: ubuntu-latest
name: "Tests Frontend"
steps:
- name: 'Checkout Code'
uses: actions/checkout@v2
- name: 'NPM update'
run: npm install
- name: 'NPM run tests'
run: npm run test
# code-coverage:
# needs: test
# runs-on: ubuntu-latest
# name: "Code Coverage"
# strategy:
# fail-fast: false
# steps:
# - name: 'Checkout Code'
# uses: actions/checkout@v2
#
# - name: 'Setup PHP'
# uses: shivammathur/setup-php@v2
# with:
# php-version: 8.1
# ini-values: memory_limit=-1
# coverage: pcov
# tools: composer:v2
#
# - name: 'Install PHP dependencies with Composer'
# run: composer install --prefer-dist --no-progress --optimize-autoloader
# working-directory: './'
#
# - name: 'Run PHPUnit with Code Coverage'
# run: ./vendor/bin/phpunit -v -c phpunit.xml.dist --coverage-clover=coverage.xml
#
# - name: 'Download Coverage Files'
# uses: actions/download-artifact@v2
# with:
# path: reports
#
# - name: 'Upload to Codecov'
# uses: codecov/codecov-action@v1
# with:
# files: ./coverage.xml
# fail_ci_if_error: true
# verbose: true
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Log in to GitHub container registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Lowercase the repo name
# run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
# - name: Build and push container image to registry
# uses: docker/build-push-action@v4
# with:
# push: true
# tags: ghcr.io/${{ env.REPO }}:${{ github.sha }}
# file: .docker/roadrunner/Dockerfile
#
# deploy:
# runs-on: ubuntu-latest
# needs: build
# environment:
# name: 'production'
# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
# steps:
# - name: Lowercase the repo name
# run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
# - name: Deploy to Azure Web App
# id: deploy-to-webapp
# uses: azure/webapps-deploy@85270a1854658d167ab239bce43949edb336fa7c
# with:
# app-name: ${{ env.AZURE_WEBAPP_NAME }}
# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
# images: 'ghcr.io/${{ env.REPO }}:${{ github.sha }}'