Roman_applicant-site/.gitea/workflows/php.yml

80 lines
2.0 KiB
YAML
Raw Normal View History

2024-01-12 09:10:59 +03:00
name: Tests & Lint & Deploy to Railway
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
2024-02-05 13:14:29 +03:00
build:
runs-on: ubuntu-latest
strategy:
matrix:
2024-02-10 14:30:32 +03:00
php-version: [ '8.3' ]
2024-02-05 13:14:29 +03:00
node-version: ['20.x']
2024-02-10 14:30:32 +03:00
composer-version: ['2.6.6']
2024-02-05 13:14:29 +03:00
steps:
- uses: actions/checkout@v4
2024-02-10 14:10:13 +03:00
2024-02-10 14:36:40 +03:00
- name: Set up PHP ${{ matrix.php-version }} with extensions and tools
2024-02-10 14:10:13 +03:00
uses: shivammathur/setup-php@v2
with:
2024-02-10 14:30:32 +03:00
php-version: ${{ matrix.php-version }}
2024-02-10 14:10:13 +03:00
coverage: xdebug
2024-02-10 14:30:32 +03:00
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite
tools: composer:${{ matrix.composer-version }}
2024-02-10 14:10:13 +03:00
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M
env:
debug: true
- name: PHP Security Checker
uses: StephaneBour/actions-php-security-checker@1.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
2024-02-05 13:14:29 +03:00
2024-02-10 14:21:43 +03:00
- name: Add keys
run: |
sudo curl -o ~/.composer/keys.tags.pub -sL https://composer.github.io/releases.pub
sudo curl -o ~/.composer/keys.dev.pub -sL https://composer.github.io/snapshots.pub
2024-02-05 13:14:29 +03:00
2024-02-10 14:32:50 +03:00
- name: Install dependencies
env:
2024-02-10 14:46:03 +03:00
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH_JSON }}
run: composer install
2024-02-10 14:10:57 +03:00
- name: Setup project
2024-02-10 14:36:40 +03:00
run: make setup-test
2024-02-10 14:10:57 +03:00
- name: Check lint
run: make lint
- name: Check tests
run: make test
2024-02-10 14:32:50 +03:00
2024-03-07 14:00:45 +03:00
# deploy:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: deploy to test server
# uses: appleboy/ssh-action@v1.0.3
#
# with:
# host: ${{ secrets.HOST }}
# username: ${{ secrets.USERNAME }}
# password: ${{ secrets.PASSWORD }}
# port: ${{ secrets.PORT }}
# script: |
# cd /var/www/test-testabit/
# git stash
# git pull --rebase
# git stash clear
# make setup-test