backupscript/.gitea/workflows/build.yml

37 lines
1.1 KiB
YAML
Raw Normal View History

2023-07-24 11:20:16 +00:00
name: Build and test
run-name: Perform a regular build and test
2023-07-24 11:27:45 +00:00
on: push
2023-07-24 11:11:04 +00:00
jobs:
2023-07-24 11:20:16 +00:00
requirements:
2023-07-24 11:11:04 +00:00
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
2023-07-24 11:20:16 +00:00
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, xml, curl, zip
2023-07-24 11:52:14 +00:00
tools: composer, phpdoc
2023-07-24 11:49:51 +00:00
coverage: xdebug
2023-07-24 11:38:27 +00:00
- name: Install dependencies
run: |
2023-07-24 11:49:51 +00:00
composer config github-oauth.github.com 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
2023-07-24 11:38:27 +00:00
composer install
2023-07-24 12:02:11 +00:00
wget https://downloads.rclone.org/rclone-current-linux-amd64.deb
dpkg -i rclone-current-linux-amd64.deb
2023-07-24 11:38:27 +00:00
- name: Dry run
run: ./backup show config.example.yml
2023-07-24 12:02:11 +00:00
- name: Static analysis
run: composer analyze
2023-07-24 11:38:27 +00:00
- name: Test
2023-07-24 12:02:11 +00:00
run: composer test-coverage
- uses: actions/upload-artifact@v3
with:
path: output/coverage/
2023-07-24 11:38:27 +00:00
- name: Document
2023-07-24 12:02:11 +00:00
run: phpdoc run
- uses: actions/upload-artifact@v3
with:
path: output/docs