mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 23:41:10 +00:00
Rename workflows.
This commit is contained in:
18
.github/workflows/cleanup.yml
vendored
18
.github/workflows/cleanup.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
# This workflow prunes old workflow runs for an entire repository.
|
# This workflow prunes old workflow runs for an entire repository.
|
||||||
|
|
||||||
name: Prune old builds
|
name: "Chore - prune old builds"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
@@ -22,14 +22,14 @@ jobs:
|
|||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
status: 'cancelled',
|
status: 'cancelled',
|
||||||
});
|
});
|
||||||
|
|
||||||
const skipped = await github.rest.actions.listWorkflowRunsForRepo({
|
const skipped = await github.rest.actions.listWorkflowRunsForRepo({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
per_page: 100,
|
per_page: 100,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
status: 'skipped',
|
status: 'skipped',
|
||||||
});
|
});
|
||||||
|
|
||||||
for (const response of [cancelled, skipped]) {
|
for (const response of [cancelled, skipped]) {
|
||||||
for (const run of response.data.workflow_runs) {
|
for (const run of response.data.workflow_runs) {
|
||||||
console.log(`Run id ${run.id} of '${run.name}' is a cancelled/skipped run. Deleting...`);
|
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 ms_in_day = 86400000;
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
const pages = 5;
|
const pages = 5;
|
||||||
|
|
||||||
// we don't want to prune old runs from test.yml
|
// we don't want to prune old runs from test.yml
|
||||||
// because we track the duration of runs over time
|
// because we track the duration of runs over time
|
||||||
|
|
||||||
const workflows = [
|
const workflows = [
|
||||||
'cleanup.yml',
|
'cleanup.yml',
|
||||||
'closed-issues.yml',
|
'closed-issues.yml',
|
||||||
@@ -64,9 +64,9 @@ jobs:
|
|||||||
'sonarcloud.yml',
|
'sonarcloud.yml',
|
||||||
'stale.yml'
|
'stale.yml'
|
||||||
]
|
]
|
||||||
|
|
||||||
let runs_to_delete = [];
|
let runs_to_delete = [];
|
||||||
|
|
||||||
for (const workflow of workflows) {
|
for (const workflow of workflows) {
|
||||||
for (let page = 0; page < pages; page += 1) {
|
for (let page = 0; page < pages; page += 1) {
|
||||||
let response = await github.rest.actions.listWorkflowRuns({
|
let response = await github.rest.actions.listWorkflowRuns({
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
workflow_id: workflow
|
workflow_id: workflow
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.data.workflow_runs.length > 0) {
|
if (response.data.workflow_runs.length > 0) {
|
||||||
for (const run of response.data.workflow_runs) {
|
for (const run of response.data.workflow_runs) {
|
||||||
if (now - Date.parse(run.created_at) > ms_in_day * days_to_expiration) {
|
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) {
|
for (const run of runs_to_delete) {
|
||||||
console.log(`Run id ${run[0]} of '${run[1]}' is older than ${days_to_expiration} days. Deleting...`);
|
console.log(`Run id ${run[0]} of '${run[1]}' is older than ${days_to_expiration} days. Deleting...`);
|
||||||
try {
|
try {
|
||||||
|
|||||||
2
.github/workflows/closed-issues.yml
vendored
2
.github/workflows/closed-issues.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: "Reply to closed issue"
|
name: "Issues - reply to closed issue"
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types:
|
types:
|
||||||
|
|||||||
2
.github/workflows/depsreview.yaml
vendored
2
.github/workflows/depsreview.yaml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: 'Dependency Review'
|
name: 'Code - dependency review'
|
||||||
on: [ pull_request ]
|
on: [ pull_request ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
2
.github/workflows/label-actions.yml
vendored
2
.github/workflows/label-actions.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: 'Label Actions'
|
name: 'Issues - reply to specific labels'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
|
|||||||
146
.github/workflows/laravel.yml
vendored
146
.github/workflows/laravel.yml
vendored
@@ -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
|
|
||||||
2
.github/workflows/lock.yml
vendored
2
.github/workflows/lock.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Lock old issues
|
name: 'Issues - Lock old issues'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|||||||
35
.github/workflows/qodana.yml
vendored
35
.github/workflows/qodana.yml
vendored
@@ -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 }}
|
|
||||||
4
.github/workflows/sonarcloud.yml
vendored
4
.github/workflows/sonarcloud.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: Sonarcloud
|
name: 'Code - Run Sonarcloud'
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|||||||
8
.github/workflows/stale.yml
vendored
8
.github/workflows/stale.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: "Close stale issues"
|
name: "Issues - close stale issues"
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "30 1 * * *"
|
- cron: "30 1 * * *"
|
||||||
@@ -20,13 +20,13 @@ jobs:
|
|||||||
stale-issue-message: >
|
stale-issue-message: >
|
||||||
Hi there! This is an automatic reply. `Share and enjoy`
|
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.
|
Thank you for your contributions.
|
||||||
stale-pr-message: >
|
stale-pr-message: >
|
||||||
Hi there! This is an automatic reply. `Share and enjoy`
|
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.
|
Thank you for your contributions.
|
||||||
days-before-stale: 14
|
days-before-stale: 14
|
||||||
|
|||||||
Reference in New Issue
Block a user