2023-11-16 10:39:37 +00:00
|
|
|
name: Build and test
|
|
|
|
run-name: Perform a regular build and test
|
|
|
|
on: push
|
2023-11-16 10:36:58 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-11-16 10:39:37 +00:00
|
|
|
requirements:
|
2023-11-16 10:36:58 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v3
|
2023-11-16 10:39:37 +00:00
|
|
|
- name: Setup PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: '8.2'
|
|
|
|
extensions: mbstring, xml, curl, zip
|
|
|
|
tools: composer, phpdoc
|
|
|
|
coverage: xdebug
|
|
|
|
- name: Install dependencies
|
2023-11-16 10:36:58 +00:00
|
|
|
run: |
|
2023-11-16 10:39:37 +00:00
|
|
|
composer config github-oauth.github.com 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
|
|
|
|
composer install
|
|
|
|
wget https://downloads.rclone.org/rclone-current-linux-amd64.deb
|
|
|
|
dpkg -i rclone-current-linux-amd64.deb
|
|
|
|
- name: Dry run
|
|
|
|
run: ./backup show config.example.yml
|
|
|
|
- name: Static analysis
|
|
|
|
run: composer analyze
|
|
|
|
- name: Test
|
2023-11-16 11:02:19 +00:00
|
|
|
run: composer test-full
|
2023-11-16 13:13:57 +00:00
|
|
|
- name: Upload Test report
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-11-16 10:39:37 +00:00
|
|
|
path: output/test.html
|
2023-11-16 13:13:57 +00:00
|
|
|
name: test.html
|
2023-11-16 11:02:19 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-11-16 13:13:57 +00:00
|
|
|
path: output/coverage
|
|
|
|
name: test-coverage.zip
|
2023-11-16 10:39:37 +00:00
|
|
|
- name: Document
|
|
|
|
run: phpdoc run
|
2023-11-16 11:02:19 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-11-16 13:13:57 +00:00
|
|
|
path: output/docs
|
|
|
|
name: documentation.zip
|