diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 5f820b0c40..a67f4c107e 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -1,6 +1,6 @@ # This workflow prunes old workflow runs for an entire repository. -name: Prune old builds +name: "Chore - prune old builds" on: schedule: @@ -22,14 +22,14 @@ jobs: repo: context.repo.repo, status: 'cancelled', }); - + const skipped = await github.rest.actions.listWorkflowRunsForRepo({ owner: context.repo.owner, per_page: 100, repo: context.repo.repo, status: 'skipped', }); - + for (const response of [cancelled, skipped]) { for (const run of response.data.workflow_runs) { console.log(`Run id ${run.id} of '${run.name}' is a cancelled/skipped run. Deleting...`); @@ -50,10 +50,10 @@ jobs: const ms_in_day = 86400000; const now = Date.now(); const pages = 5; - + // we don't want to prune old runs from test.yml // because we track the duration of runs over time - + const workflows = [ 'cleanup.yml', 'closed-issues.yml', @@ -64,9 +64,9 @@ jobs: 'sonarcloud.yml', 'stale.yml' ] - + let runs_to_delete = []; - + for (const workflow of workflows) { for (let page = 0; page < pages; page += 1) { let response = await github.rest.actions.listWorkflowRuns({ @@ -76,7 +76,7 @@ jobs: repo: context.repo.repo, workflow_id: workflow }); - + if (response.data.workflow_runs.length > 0) { for (const run of response.data.workflow_runs) { if (now - Date.parse(run.created_at) > ms_in_day * days_to_expiration) { @@ -86,7 +86,7 @@ jobs: } } } - + for (const run of runs_to_delete) { console.log(`Run id ${run[0]} of '${run[1]}' is older than ${days_to_expiration} days. Deleting...`); try { diff --git a/.github/workflows/closed-issues.yml b/.github/workflows/closed-issues.yml index 22a9c3438f..43c68d6e92 100644 --- a/.github/workflows/closed-issues.yml +++ b/.github/workflows/closed-issues.yml @@ -1,4 +1,4 @@ -name: "Reply to closed issue" +name: "Issues - reply to closed issue" on: issues: types: diff --git a/.github/workflows/depsreview.yaml b/.github/workflows/depsreview.yaml index d5ed859514..29d9f8de8b 100644 --- a/.github/workflows/depsreview.yaml +++ b/.github/workflows/depsreview.yaml @@ -1,4 +1,4 @@ -name: 'Dependency Review' +name: 'Code - dependency review' on: [ pull_request ] permissions: diff --git a/.github/workflows/label-actions.yml b/.github/workflows/label-actions.yml index caf1a31cc1..115647bdef 100644 --- a/.github/workflows/label-actions.yml +++ b/.github/workflows/label-actions.yml @@ -1,4 +1,4 @@ -name: 'Label Actions' +name: 'Issues - reply to specific labels' on: issues: diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml deleted file mode 100644 index 75babbfe2d..0000000000 --- a/.github/workflows/laravel.yml +++ /dev/null @@ -1,146 +0,0 @@ -name: Firefly III - -on: - push: - branches-ignore: - - '**' - -jobs: - prepare: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Copy .env - run: test -f .env || cp .ci/.env.ci .env - - name: Prepare dependencies - run: | - set -euxo pipefail - export PATH=$PATH:$HOME/.composer/vendor/bin/ - composer global require hirak/prestissimo --no-plugins --no-scripts - composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest - - touch ./storage/database/database.sqlite - - name: Prepare Firefly III - run: | - chmod -R 777 storage bootstrap/cache - php artisan migrate --seed - php artisan firefly-iii:upgrade-database - - name: Upload database - uses: actions/upload-artifact@v2 - with: - name: database - path: storage/database/database.sqlite - - name: Upload cache - uses: actions/upload-artifact@v2 - with: - name: cache - path: bootstrap/cache/ - - name: Upload composer cache - uses: actions/upload-artifact@v2 - with: - name: composer - path: ~/.composer - - laravel-tests: - - runs-on: ubuntu-latest - - needs: - - prepare - - steps: - - uses: actions/checkout@v3 - - name: Copy .env - run: test -f .env || cp .ci/.env.ci .env - - name: Download database - uses: actions/download-artifact@v2 - with: - name: database - path: storage/database/database.sqlite - - name: Download cache - uses: actions/download-artifact@v2 - with: - name: cache - path: bootstrap/cache/ - - name: Download vendor - uses: actions/download-artifact@v2 - with: - name: composer - path: ~/.composer - - name: Install composer - run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest - - - name: PHPUnit tests - uses: php-actions/phpunit@v1 - with: - config: phpunit.xml - memory: 512M - - coding-standards: - - runs-on: ubuntu-latest - - needs: - - prepare - - steps: - - uses: actions/checkout@v3 - - name: Copy .env - run: test -f .env || cp .ci/.env.ci .env - - name: Download database - uses: actions/download-artifact@v2 - with: - name: database - path: storage/database/database.sqlite - - name: Download cache - uses: actions/download-artifact@v2 - with: - name: cache - path: bootstrap/cache/ - - name: Download vendor - uses: actions/download-artifact@v2 - with: - name: composer - path: ~/.composer - - name: install depenencies - run: | - composer global require nette/coding-standard - composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest - - - name: Execute code standard - run: /home/runner/.composer/vendor/bin/ecs check app tests --config ./.ci/firefly-iii-standard.yml - - phpstan: - - runs-on: ubuntu-latest - - needs: - - prepare - - steps: - - uses: actions/checkout@v3 - - name: Copy .env - run: test -f .env || cp .ci/.env.ci .env - - name: Download database - uses: actions/download-artifact@v2 - with: - name: database - path: storage/database/database.sqlite - - name: Download cache - uses: actions/download-artifact@v2 - with: - name: cache - path: bootstrap/cache/ - - name: Download vendor - uses: actions/download-artifact@v2 - with: - name: composer - path: ~/.composer - - name: Install depenencies - run: | - composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest - - - name: Execute PHPStan - run: vendor/bin/phpstan analyse -c .ci/phpstan.neon diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index f01515c30d..f80cc38ef4 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -1,4 +1,4 @@ -name: Lock old issues +name: 'Issues - Lock old issues' on: workflow_dispatch: diff --git a/.github/workflows/qodana.yml b/.github/workflows/qodana.yml deleted file mode 100644 index da78ebabe8..0000000000 --- a/.github/workflows/qodana.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Qodana -on: - workflow_dispatch: - push: - branches: - - main - - develop -jobs: - qodana: - runs-on: ubuntu-latest - name: 'Qodana Scan' - steps: - - name: Setup PHP with no coverage driver - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - coverage: none - extensions: bcmath, intl - env: - update: true - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Install dependencies - run: | - composer install --no-scripts - cp .env.example .env - php artisan key:generate - php artisan clear-compiled - php artisan ide-helper:generate; - - - name: 'Qodana Scan' - uses: JetBrains/qodana-action@main - env: - QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index e9ba1b9b27..9ca453e11c 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -1,6 +1,6 @@ -name: Sonarcloud +name: 'Code - Run Sonarcloud' on: - pull_request: + pull_request: push: branches: - main diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 817763ac59..0b9bf683fb 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,4 +1,4 @@ -name: "Close stale issues" +name: "Issues - close stale issues" on: schedule: - cron: "30 1 * * *" @@ -20,13 +20,13 @@ jobs: stale-issue-message: > Hi there! This is an automatic reply. `Share and enjoy` - This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. - + This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. + Thank you for your contributions. stale-pr-message: > Hi there! This is an automatic reply. `Share and enjoy` - This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. + This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. days-before-stale: 14