Skip to content

Commit

Permalink
Switch to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zhgzhg committed Dec 30, 2023
1 parent fb1798c commit 114eb79
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 93 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build
on:
push:
branches: [ '*', '!gh-pages' ]
pull_request:
branches: [ '*', '!gh-pages' ]

jobs:
test_php_versions:
name: GPHPThread on PHP ${{ matrix.php-version }}, ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-version: ["5.3", "5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: Run PHP Tests
run: |
php tests/run_all.php
- id: cache_phpdocumentor
if: ${{ matrix.php-version == '8.2' }}
uses: actions/cache@v3
with:
path: |
phpDocumentor.phar
key: phpDocumentor-${{ runner.os }}-${{ hashFiles('phpDocumentor.phar') }}

- name: Download phpDocumentor.phar
if: ${{ matrix.php-version == '8.2' }}
run: |
if [ ! -f phpDocumentor.phar ]; then
curl -L -o ./phpDocumentor.phar https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.4.3/phpDocumentor.phar ;
fi
- name: Run PHPDocumentor
if: ${{ matrix.php-version == '8.2' }}
run: |
if [ -f phpDocumentor.phar ]; then
sudo apt update
sudo apt install -y graphviz plantuml
php phpDocumentor.phar -s graphs.enabled=true
else
echo "phpDocumentor.phar not found. Please check the download step."
exit 1
fi
- name: Upload Documentation
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ matrix.php-version == '8.2' && success() == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
branch: gh-pages
folder: 'Documentation'
single-commit: true
93 changes: 0 additions & 93 deletions .travis.yml

This file was deleted.

0 comments on commit 114eb79

Please sign in to comment.