From 21f51854e6f0bfc884465838932583d10775d519 Mon Sep 17 00:00:00 2001 From: mychidarko Date: Mon, 4 Nov 2024 19:46:41 +0000 Subject: [PATCH] chore: generate alchemy actions --- .github/workflows/lint.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/tests.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..7877bd0 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,34 @@ +name: Lint code + +on: [push] + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + fail-fast: true + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: json, zip + tools: composer:v2 + coverage: none + + - name: Install PHP dependencies + run: composer update --no-interaction --no-progress + + - name: Run Linter + run: composer run lint + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: 'chore: fix styling' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..c787f6b --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,32 @@ +name: Run Tests + +on: ["push","pull_request"] + +jobs: + tests: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: ["macos-latest","ubuntu-latest","windows-latest"] + php: ["8.3","8.2","8.1","8.0","7.4"] + + name: PHP ${{ matrix.php }} - ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: json, zip + tools: composer:v2 + coverage: xdebug + + - name: Install PHP dependencies + run: composer update --no-interaction --no-progress + + - name: Run Tests + run: composer run test -- --flags=coverage