Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Add stylelint 4 space indent #1967

Merged
merged 5 commits into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ root = true
; Unix-style newlines
[*]
end_of_line = LF

[*.php]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's seem this file haven't been serving its purpose before.
This allows to have standard 4-space format for each file.

indent_style = space
indent_size = 4
39 changes: 39 additions & 0 deletions .github/workflows/assets_code_analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Assets Code Analysis

on:
pull_request: null
push:
branches:
- master

jobs:
asses_code_analysis:
strategy:
fail-fast: false
matrix:
actions:
-
name: Lint Javascript files
run: npm run lint

-
name: Lint on SCSS files
run: npm run stylelint

name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

# see https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml
-
name: Use Node.js 12.5
uses: actions/setup-node@v1
with:
node-version: 12.5

# same as "npm install", just uses package-lock.json", see https://stackoverflow.com/a/53325242/1348344
- run: npm ci

- run: ${{ matrix.actions.run }}
74 changes: 34 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,54 @@ language: php
dist: xenial
sudo: false
php:
- 7.2
- 7.3
- 7.4
- 7.2
- 7.3
- 7.4

addons:
chrome: stable
chrome: stable

cache:
directories:
- $HOME/.composer/cache/files
directories:
- $HOME/.composer/cache/files

matrix:
fast_finish: true
fast_finish: true

before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer self-update -q
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer self-update -q

install:
- COMPOSER_MEMORY_LIMIT=-1 composer update
- ./bin/console bolt:info
- nvm install 12.5
- npm ci
- mkdir -p ./var/log/e2e-reports/report/features/
- touch ./var/log/e2e-reports/report/features/.gitkeep
- COMPOSER_MEMORY_LIMIT=-1 composer update
- ./bin/console bolt:info
- nvm install 12.5
- npm ci
- mkdir -p ./var/log/e2e-reports/report/features/
- touch ./var/log/e2e-reports/report/features/.gitkeep

before_script:
# build assets
- npm run build
# prepare web server for e2e tests
- ./bin/console doctrine:database:create
- ./bin/console doctrine:schema:create
- ./bin/console doctrine:fixtures:load --group=without-images -n
- ./bin/console server:start 127.0.0.1:8088
# test if web server works
- sleep 3
- wget "http://127.0.0.1:8088/bolt/login"
- export PATH=$PATH:$PWD/vendor/bin
# build assets
- npm run build
# prepare web server for e2e tests
- ./bin/console doctrine:database:create
- ./bin/console doctrine:schema:create
- ./bin/console doctrine:fixtures:load --group=without-images -n
- ./bin/console server:start 127.0.0.1:8088
# test if web server works
- sleep 3
- wget "http://127.0.0.1:8088/bolt/login"
- export PATH=$PATH:$PWD/vendor/bin

script:
# run EsLint on Javascript files
- npm run lint
# run PHP Unit
- ./vendor/bin/phpunit

# run StyleLint on SCSS
- npm run stylelint
# run API tests
- make behat-api-quiet

# run PHP Unit
- ./vendor/bin/phpunit
# run JS e2e tests
- travis_retry make db-reset-without-images && make behat-js-quiet

# run API tests
- make behat-api-quiet

# run JS e2e tests
- travis_retry make db-reset-without-images && make behat-js-quiet

# Upload Behat logs
- ./vendor/bin/upload-textfiles "var/log/behat-reports/*.log"
# Upload Behat logs
- ./vendor/bin/upload-textfiles "var/log/behat-reports/*.log"
Loading