From 43cbe6f7993e68159085b0b9030f13e70af8ed64 Mon Sep 17 00:00:00 2001 From: Hussein Baderddeine <110332667+HusseinBader2002@users.noreply.github.com> Date: Sun, 15 Dec 2024 20:21:05 -0600 Subject: [PATCH] Create .github/workflows ci.yml is the file with the YAML --- .workflows | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .workflows diff --git a/.workflows b/.workflows new file mode 100644 index 00000000..afa34f1a --- /dev/null +++ b/.workflows @@ -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 }}