Skip to content
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
9 changes: 6 additions & 3 deletions .github/workflows/a11y_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

# see https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml
-
name: Use Node.js
name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
Expand All @@ -36,6 +36,9 @@ jobs:
php-version: ${{ matrix.php-version }}
extensions: json, mbstring, pdo, curl, pdo_sqlite
coverage: none
tools: symfony-cli:5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install composer dependencies
run: composer install --prefer-dist --no-progress
- name: Show Bolt info
Expand All @@ -50,8 +53,8 @@ jobs:
# 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
./bin/console doctrine:fixtures:load --group=without-images -n
symfony server:start --no-tls --port=8088 -d
# test if web server works
sleep 3
curl --silent --show-error --fail "http://127.0.0.1:8088/bolt/login"
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/api_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@ jobs:
php-version: ${{ matrix.php-version }}
extensions: json, mbstring, pdo, curl, pdo_sqlite
coverage: none
tools: symfony-cli:5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install composer dependencies
run: composer install --prefer-dist --no-progress
- name: Initialise the database
run: |
sudo chmod -R 777 config/ public/files/ public/theme/ public/thumbs/ var/
./bin/console doctrine:database:create
./bin/console doctrine:schema:create
./bin/console server:start 127.0.0.1:8088
symfony server:start --no-tls --port=8088 -d
- name: create api user
run: php bin/console bolt:add-user apiuser apiuser%1 [email protected] API --roles=ROLE_WEBSERVICE
- name: check API user gets content
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:
php-version: ${{ matrix.php-version }}
extensions: json, mbstring, pdo, curl, pdo_sqlite
coverage: none
tools: symfony-cli:5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: composer install --no-progress --ansi

Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/cypress_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
php-version: 8.2
extensions: json, mbstring, pdo, curl, pdo_sqlite
coverage: none
tools: symfony-cli:5
# Configure PHP to disable Session garbage collector and fix the timezone to UTC like Bolt use to compare date.
ini-values: session.gc_probability=0, date.timezone=UTC
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: 20
Expand All @@ -50,25 +55,31 @@ jobs:
# 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:schema:create -q
./bin/console doctrine:migrations:sync-metadata-storage -q
./bin/console doctrine:migrations:version --add --all -n -q
./bin/console doctrine:fixtures:load --group=without-images -n
./bin/console server:start 127.0.0.1:8088
symfony server:start --no-tls --port=8088 -d
# test if web server works
sleep 3
curl --silent --show-error --fail "http://127.0.0.1:8088/bolt/login"

- name: Cypress run
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v6
with:
command: "npm run cypress:ci"
wait-on: 'http://127.0.0.1:8088'
record: true
parallel: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.CYPRESS_GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-evidence
path: tests/cypress/evidence
name: cypress-evidence-${{matrix.containers}}
path: |
tests/cypress/evidence
var/log
2 changes: 2 additions & 0 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
php-version: ${{ matrix.php-version }}
extensions: json, mbstring, pdo, curl, pdo_sqlite
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install composer dependencies
run: composer install --prefer-dist --no-progress
- name: run PHP Unit
Expand Down