Skip to content

Commit ea3456c

Browse files
author
Workflow Sync Bot
committed
💬 - Files Synced | Runner ID : 42 | ⚡ Triggered By fuelviews/github-workflow-sync
1 parent 4500901 commit ea3456c

File tree

1 file changed

+54
-23
lines changed

1 file changed

+54
-23
lines changed

‎.github/workflows/run-tests.yml

+54-23
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,64 @@
1-
name: dependabot-auto-merge
2-
on: pull_request_target
1+
name: run-tests
32

4-
permissions:
5-
pull-requests: write
6-
contents: write
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- '.github/workflows/run-tests.yml'
8+
- 'phpunit.xml.dist'
9+
- 'composer.json'
10+
- 'composer.lock'
11+
pull_request_target:
12+
branches:
13+
- main
714

815
jobs:
9-
dependabot:
10-
runs-on: ubuntu-latest
16+
test:
17+
runs-on: ${{ matrix.os }}
1118
timeout-minutes: 5
12-
if: ${{ github.actor == 'dependabot[bot]' }}
19+
strategy:
20+
fail-fast: true
21+
matrix:
22+
os: [ubuntu-latest]
23+
php: [8.3, 8.2]
24+
laravel: [10.*]
25+
stability: [prefer-lowest, prefer-stable]
26+
include:
27+
- laravel: 10.*
28+
testbench: 8.*
29+
30+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
31+
1332
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v4
1435

15-
- name: Dependabot metadata
16-
id: metadata
17-
uses: dependabot/[email protected]
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
1838
with:
19-
github-token: "${{ secrets.GITHUB_TOKEN }}"
39+
php-version: ${{ matrix.php }}
40+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
41+
coverage: none
2042

21-
- name: Auto-merge Dependabot PRs for semver-minor updates
22-
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
23-
run: gh pr merge --auto --merge "$PR_URL"
24-
env:
25-
PR_URL: ${{github.event.pull_request.html_url}}
26-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
43+
- name: Setup problem matchers
44+
run: |
45+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
46+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
2747
28-
- name: Auto-merge Dependabot PRs for semver-patch updates
29-
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
30-
run: gh pr merge --auto --merge "$PR_URL"
48+
- name: Configure GitHub Token
3149
env:
32-
PR_URL: ${{github.event.pull_request.html_url}}
33-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
50+
GH_TOKEN: ${{ secrets.GHA_PERSONAL_ACCESS_TOKEN }}
51+
run: |
52+
git config --global url."https://${GH_TOKEN}@github.com/".insteadOf "https://github.com/"
53+
git config --global url."https://${GH_TOKEN}@github.com/".insteadOf "[email protected]:"
54+
55+
- name: Install dependencies
56+
run: |
57+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
58+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
59+
60+
- name: List Installed Dependencies
61+
run: composer show -D
62+
63+
- name: Execute tests
64+
run: vendor/bin/pest --ci

0 commit comments

Comments
 (0)