Skip to content

Commit

Permalink
Merge branch '2.0' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
klaussilveira committed Jan 15, 2022
1 parent 28827c6 commit 9bf0e0c
Show file tree
Hide file tree
Showing 400 changed files with 39,512 additions and 21,255 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.git/
node_modules/
vendor/
var/cache
var/logs
var/log
var/sessions
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{js,html,twig,yaml}]
indent_size = 2

[*.{php}]
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
APP_ENV=dev
APP_SECRET=foobar
DEFAULT_REPOSITORY_DIR=/var/repositories
116 changes: 116 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Build
on: [push, pull_request]

jobs:
backend:
runs-on: ubuntu-latest

strategy:
matrix:
php: [8.1]

steps:
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate --strict --no-check-version

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run unit test suite
run: composer run-script unit

- name: Validate coding standards
run: composer run-script cs

- name: Run linters
run: composer run-script lint

- name: Run static analysis
run: composer run-script stan

frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: '16'

- name: Install frontend dependencies
run: npm install

- name: Run frontend test suite
run: npm test

acceptance:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: '16'

- name: Install dependencies
run: composer install --prefer-dist --no-progress && npm install

- name: Build frontend assets
run: npm run build

- name: Run application server
run: echo 'deb [trusted=yes] https://repo.symfony.com/apt/ /' | sudo tee /etc/apt/sources.list.d/symfony-cli.list && sudo apt update && sudo apt install symfony-cli && APP_ENV=prod DEFAULT_REPOSITORY_DIR=${{ github.workspace }}/tests/fixtures symfony server:start --port=8880 -d

- name: Run Cypress acceptance tests
uses: cypress-io/github-action@v2

release:
runs-on: ubuntu-latest
needs: [backend, frontend]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: '16'

- name: Install frontend dependencies
run: npm install

- name: Build package
run: make build

- name: Rename package to current tag
run: mv build.zip gitlist-${{ github.ref_name }}.zip

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: gitlist-${{ github.ref_name }}.zip
60 changes: 0 additions & 60 deletions .github/workflows/legacy.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Nightly Build
on:
workflow_dispatch: ~
schedule:
- cron: '0 0 * * *'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: '16'

- name: Install frontend dependencies
run: npm install

- name: Build package
run: make build

- name: Rename package
run: mv build.zip gitlist-nightly.zip

- name: Release
uses: softprops/action-gh-release@v1
with:
name: nightly
tag_name: nightly
prerelease: true
body: Nightly release generated from `master` at 12 AM UTC.
files: gitlist-nightly.zip
45 changes: 10 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,13 @@
cache/
public/bundles/
public/assets/
var/
vendor/
build/
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.zip
*.vi
*~
*.sass-cache
.DS_Store
._*
Thumbs.db
.cache
.project
.settings
.tmproj
*.esproj
nbproject
*.sublime-project
*.sublime-workspace
.hg
.svn
.CVS
.idea
node_modules
config.ini
cache.properties
composer.phar
phpunit.xml
node_modules/
.env
docker-compose.override.yml
npm-debug.log
yarn-error.log
.php_cs.cache
web.config
.vscode/
.phpunit.result.cache
.php-cs-fixer.cache
phpunit.xml
14 changes: 0 additions & 14 deletions .htaccess

This file was deleted.

42 changes: 42 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
;

$config = new PhpCsFixer\Config();
return $config->setRules([
'@Symfony' => true,
'@PHP80Migration:risky' => true,
'@PHPUnit84Migration:risky' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => true,
'increment_style' => ['style' => 'post'],
'is_null' => true,
'list_syntax' => ['syntax' => 'short'],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'method_chaining_indentation' => true,
'modernize_types_casting' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => false,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => true,
'phpdoc_align' => false,
'phpdoc_order' => true,
'php_unit_construct' => true,
'php_unit_dedicate_assert' => true,
'return_assignment' => true,
'single_blank_line_at_eof' => true,
'single_line_comment_style' => true,
'ternary_to_null_coalescing' => true,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
'void_return' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
;
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
Loading

0 comments on commit 9bf0e0c

Please sign in to comment.