-
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (69 loc) · 2.43 KB
/
reports.yml
File metadata and controls
85 lines (69 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Generate Reports and Deploy to GitHub Pages
on:
workflow_call:
workflow_dispatch:
push:
branches: [ "main" ]
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
reports:
name: Generate Reports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: pcov, pcntl
coverage: pcov
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ github.token }}"} }'
COMPOSER_CACHE_DIR: /tmp/composer-cache
COMPOSER_ROOT_VERSION: dev-main
run: composer install --prefer-dist --no-progress --no-interaction --no-scripts
- name: Mark workspace as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Generate reports
env:
COMPOSER_ROOT_VERSION: dev-main
run: php bin/dev-tools reports
- name: Fix permissions
run: |
chmod -c -R +rX "public/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v5
with:
path: public/
deploy:
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
name: Deploy to GitHub Pages
needs: reports
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5