backupscript/.gitea/workflows/build.yaml

40 lines
1.2 KiB
YAML
Raw Normal View History

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 10:39:37 +00:00
- uses: actions/upload-artifact@v3
with:
path: output/test.html
2023-11-16 11:02:19 +00:00
- uses: actions/upload-artifact@v3
with:
path: coverage
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:
path: output/docs