Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
806bef5
Initial Github Actions
I-Valchev May 11, 2020
a7bd014
sudo composer self-update
I-Valchev May 11, 2020
4418782
Have node and npm
I-Valchev May 11, 2020
6325b03
fix workflow.yaml
I-Valchev May 11, 2020
7bbe2c7
Split jobs for readibility
I-Valchev May 11, 2020
819bd48
fix typo
I-Valchev May 11, 2020
fca9a04
fix
I-Valchev May 11, 2020
853e34a
fix composer install
I-Valchev May 11, 2020
37a10d6
wip
I-Valchev May 11, 2020
189c341
Update code_checks.yaml
I-Valchev May 11, 2020
9fa040f
Update code_checks.yaml
I-Valchev May 11, 2020
78c6037
Fix folder permissions
I-Valchev May 12, 2020
fb8e252
sudo chmod
I-Valchev May 12, 2020
283caf1
behat-js
I-Valchev May 12, 2020
41c959a
try manual chrome install
I-Valchev May 12, 2020
b66c378
Update code_checks.yaml
I-Valchev May 12, 2020
8502b35
Run behat quietly and with colors
I-Valchev May 12, 2020
0da0db7
Update
I-Valchev May 12, 2020
2b6ca05
split steps into jobs
I-Valchev May 15, 2020
940bc8a
Include defaults
I-Valchev May 15, 2020
447ce91
Update code_checks.yaml
I-Valchev May 15, 2020
afb5155
Update code_checks.yaml
I-Valchev May 15, 2020
cabe59f
Update code_checks.yaml
I-Valchev May 15, 2020
fbb18b0
Update code_checks.yaml
I-Valchev May 15, 2020
c178807
Update code_checks.yaml
I-Valchev May 18, 2020
a32ac52
Update code_checks.yaml
I-Valchev May 18, 2020
c4679b4
Revert back to 1 job version
I-Valchev May 18, 2020
7cbe3dc
Try running behat-api not quiet
I-Valchev May 18, 2020
a995aae
set composer timeout to 60s
I-Valchev May 22, 2020
c3879c1
Attempt to install latest Chrome
I-Valchev Jun 17, 2020
7be0a98
Initial Github Actions
I-Valchev May 11, 2020
85491d6
sudo composer self-update
I-Valchev May 11, 2020
160b15f
Have node and npm
I-Valchev May 11, 2020
f8bc3b7
fix workflow.yaml
I-Valchev May 11, 2020
29be96c
Split jobs for readibility
I-Valchev May 11, 2020
f3c28e3
fix typo
I-Valchev May 11, 2020
108f0e0
fix
I-Valchev May 11, 2020
989497a
fix composer install
I-Valchev May 11, 2020
0fe13fc
wip
I-Valchev May 11, 2020
0f13fc1
Update code_checks.yaml
I-Valchev May 11, 2020
1aa4f4b
Update code_checks.yaml
I-Valchev May 11, 2020
205ef18
Fix folder permissions
I-Valchev May 12, 2020
fea58ae
sudo chmod
I-Valchev May 12, 2020
9e9e12e
behat-js
I-Valchev May 12, 2020
1b1b8a4
try manual chrome install
I-Valchev May 12, 2020
ac020ea
Update code_checks.yaml
I-Valchev May 12, 2020
e001d84
Run behat quietly and with colors
I-Valchev May 12, 2020
d0eb574
Update
I-Valchev May 12, 2020
1c5b085
split steps into jobs
I-Valchev May 15, 2020
1eb2899
Include defaults
I-Valchev May 15, 2020
86d1008
Update code_checks.yaml
I-Valchev May 15, 2020
8ccf88a
Update code_checks.yaml
I-Valchev May 15, 2020
a4a6faf
Update code_checks.yaml
I-Valchev May 15, 2020
cb9b062
Update code_checks.yaml
I-Valchev May 15, 2020
f209766
Update code_checks.yaml
I-Valchev May 18, 2020
3561bf9
Update code_checks.yaml
I-Valchev May 18, 2020
0297acb
Revert back to 1 job version
I-Valchev May 18, 2020
ec8843e
Try running behat-api not quiet
I-Valchev May 18, 2020
ccff0a7
set composer timeout to 60s
I-Valchev May 22, 2020
26bd118
Attempt to install latest Chrome
I-Valchev Jun 17, 2020
1d8feb1
Merge branch 'repo-github-actions' of https://github.com/bolt/core in…
I-Valchev Jun 23, 2020
8da68e7
Run tests quietly
I-Valchev Jun 23, 2020
a801845
Always run behat logs upload
I-Valchev Jun 23, 2020
e4b5bd0
Wait a little longer to start selenium server
I-Valchev Jun 25, 2020
1b29ecc
tmp have output form selenium
I-Valchev Jun 25, 2020
f356f3f
Give selenium even more time to boot
I-Valchev Jun 25, 2020
c36d5bd
Update Makefile
I-Valchev Jun 25, 2020
7404542
make selenium silent (revert)
I-Valchev Jun 25, 2020
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
94 changes: 94 additions & 0 deletions .github/workflows/code_checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Code checks & tests

on:
pull_request:

jobs:
tests:
name: Tests
runs-on: ubuntu-latest

strategy:
fail-fast: false # do not cancel 7.2 if 7.3 fails
matrix:
php: ['7.2', '7.3', '7.4']
node-version: ['12.5']

steps:
- uses: actions/checkout@v2
- uses: nanasess/setup-chromedriver@master
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Initialise
run: |
sudo composer self-update -q
- name: Install dependencies
run: |
sudo COMPOSER_MEMORY_LIMIT=-1 COMPOSER_PROCESS_TIMEOUT=60 composer update --prefer-dist --no-progress
./bin/console bolt:info
npm set progress=false
npm ci
mkdir -p ./var/log/e2e-reports/report/features/
touch ./var/log/e2e-reports/report/features/.gitkeep
# Install latest stable Chrome for e2e tests
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome*.deb
- name: Prepare environment
run: |
# build assets
npm run build
sudo chmod -R 777 config/ public/files/ public/theme/ public/thumbs/ var/
# 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"
- name: this checks that the source code follows the Bolt Code Syntax rules
run: |
./vendor/bin/ecs check src
./vendor/bin/phpstan analyse -c phpstan.neon src
- name: run EsLint on Javascript files
run: npm run lint

- name: run StyleLint on SCSS
run: npm run stylelint

- name: this checks that the YAML config files contain no syntax errors
run: ./bin/console lint:yaml config

- name: this checks that the Twig template files contain no syntax errors
run: ./bin/console lint:twig templates

- name: this checks that the XLIFF translations contain no syntax errors
run: ./bin/console lint:xliff translations

- name: this checks that the application doesn't use dependencies with known security vulnerabilities
run: ./bin/console security:check

- name: this checks that the composer.json and composer.lock files are valid
run: composer validate --strict # temporarily disabled due to bug in api platform 2.4.0-beta.2

- name: this checks that Doctrine's mapping configurations are valid
run: ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction

- name: run PHP Unit
run: ./vendor/bin/phpunit

- name: run API tests
run: make behat-api-quiet

- name: Install latest Google Chrome (for e2e tests)
run: wget -q https://script.install.devinsideyou.com/google-chrome && chmod +x google-chrome

- name: run e2e tests
run: ./run_behat_tests.sh && make behat-js-quiet

- name: Upload Behat logs
run: ./vendor/bin/upload-textfiles "var/log/behat-reports/*.log"
if: always()
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ behat-js: ## to run behat JS tests
. ./run_behat_tests.sh
## run the selenium server. chromedriver executable must be in $PATH
vendor/bin/selenium-server-standalone >/dev/null 2>&1 &
sleep 2s
sleep 10s
vendor/bin/behat --tags=javascript
## @todo: stop selenium server

Expand All @@ -89,7 +89,7 @@ behat-js-quiet: ## to run behat JS tests quietly
. ./run_behat_tests.sh
## run the selenium server. chromedriver executable must be in $PATH
vendor/bin/selenium-server-standalone >/dev/null 2>&1 &
sleep 2s
sleep 10s
vendor/bin/behat --tags=javascript --format=progress
## @todo: stop selenium server

Expand Down