Skip to content

Commit

Permalink
Merge remote-tracking branch 'Lockon/master' into 20201208
Browse files Browse the repository at this point in the history
  • Loading branch information
seasoftjapan committed Jan 4, 2024
2 parents 9bdf208 + c438132 commit 7c2e7c3
Show file tree
Hide file tree
Showing 1,186 changed files with 49,905 additions and 39,860 deletions.
18 changes: 10 additions & 8 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"presets": [
[
"env",
{
"targets": {
"ie": 11
},
// 必要な分だけのpolyfillを自動でインポート
"useBuiltIns": "usage"
}
"@babel/preset-env",
{
"targets": {
"node": "current",
"ie": 11
},
// 必要な分だけのpolyfillを自動でインポート
"useBuiltIns": "usage",
"corejs": 2
}
]
]
}
4 changes: 0 additions & 4 deletions .coveralls.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.{yml,yaml,json,js}]
[*.{yml,yaml,json,js,ts}]
indent_style = space
indent_size = 2

Expand Down
27 changes: 23 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,30 @@
"env": {
"es6": true,
"browser": true,
"jquery": true
"jquery": true,
"node": true
},
"plugins": [
"plugins": [
"import"
],
"parser": "babel-eslint",
"extends": "jquery"
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"jquery"
],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"camelcase": "off",
"space-in-parens": "off",
"quotes": "off",
"no-shadow-restricted-names": "off",
"no-prototype-builtins": "off",
"max-len": ["warn", {"code": 120}],
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}]
}
}
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
allow:
- dependency-type: "all"

# GitHub アクションの依存関係を維持する
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

# npm の依存関係を維持する
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
114 changes: 114 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Coverage
on:
push:
branches:
- '*'
tags:
- '*'
paths:
- '**'
- '!*.tpl'
- '!*.css'
- '!*.js'
- '!*.md'
pull_request:
paths:
- '**'
- '!*.tpl'
- '!*.css'
- '!*.js'
- '!*.md'
jobs:
run-on-linux:
name: Run on Linux
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: [ 7.4 ]
db: [ pgsql ]
include:
- db: pgsql
dbport: '5432'
dbuser: 'postgres'
dbpass: 'password'
dbname: 'eccube_db'
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mailcatcher:
image: schickling/mailcatcher
ports:
- 1080:1080
- 1025:1025
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: ${{ matrix.php }}

- name: Install to Composer
run: composer install --no-interaction -o

- name: Create ADMIN_DIR
run: |
sudo apt-fast install -y sharutils
echo "ADMIN_DIR=$(head -c 10 < /dev/random | uuencode -m - | tail -n 2 |head -n 1 | sed 's,[/+],_,g' | head -c10)/" >> $GITHUB_ENV
- name: Setup to EC-CUBE
env:
DB: ${{ matrix.db }}
USER: ${{ matrix.dbuser }}
DBUSER: ${{ matrix.dbuser }}
DBPASS: ${{ matrix.dbpass }}
DBNAME: ${{ matrix.dbname }}
DBPORT: ${{ matrix.dbport }}
HTTP_URL: http://127.0.0.1:8085/
HTTPS_URL: http://127.0.0.1:8085/
run: |
sudo apt-fast install -y mysql-client postgresql-client
./eccube_install.sh ${DB}
- name: Run to PHPUnit
continue-on-error: true
run: phpdbg -qrr data/vendor/bin/phpunit --exclude-group classloader --coverage-clover=coverage1.xml
- name: Run to PHPUnit classloader
continue-on-error: true
run: phpdbg -qrr data/vendor/bin/phpunit --group classloader --coverage-clover=coverage2.xml
- name: Run to PHPUnit SessionFactory
continue-on-error: true
run: |
sed 's|http://|https://|g' -i.bak data/config/config.php
phpdbg -qrr data/vendor/bin/phpunit tests/class/SC_SessionFactoryTest.php --coverage-clover=coverage3.xml
mv data/config/config.php.bak data/config/config.php
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage1.xml,./coverage2.xml,./coverage3.xml
# token: ${{ secrets.CODECOV_TOKEN }}
flags: tests
# yml: ./codecov.yml
fail_ci_if_error: true
Loading

0 comments on commit 7c2e7c3

Please sign in to comment.