Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create .github/workflows #1317

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .workflows
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI Workflow

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v3

# Set up PHP
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl, xml, sqlite3
coverage: xdebug

# Install dependencies
- name: Install dependencies
run: composer install

# Run tests
- name: Run tests
run: vendor/bin/phpunit

deploy-to-azure:
needs: build-and-test
if: success()
runs-on: ubuntu-latest

steps:
# Deploy to Azure (if configured)
- name: Deploy to Azure
uses: Azure/webapps-deploy@v2
with:
app-name: YourAppName
slot-name: production
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
Loading