-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Use saucectl with configuration
- Loading branch information
1 parent
7528bb9
commit 686c4af
Showing
3 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
kind: testcafe | ||
sauce: | ||
region: us-west-1 | ||
concurrency: 2 # Controls how many suites are executed at the same time. | ||
metadata: | ||
tags: | ||
- e2e | ||
- release team | ||
- other tag | ||
build: Release $CI_COMMIT_SHORT_SHA | ||
testcafe: | ||
version: 3.6.2 | ||
# Controls what files are available in the context of a test run (unless explicitly excluded by .sauceignore). | ||
rootDir: ./ | ||
suites: | ||
- name: "One dimensional Tests in Firefox on Windows" | ||
browserName: "firefox" | ||
src: | ||
- "../../../1Dimension/*.e2e.js" | ||
platformName: "Windows 11" | ||
- name: "Two dimensional Tests in Firefox on Windows" | ||
browserName: "firefox" | ||
src: | ||
- "../../../2Dimension/*.e2e.js" | ||
platformName: "Windows 11" | ||
|
||
# Controls what artifacts to fetch when the suites have finished. | ||
artifacts: | ||
download: | ||
when: always | ||
match: | ||
- console.log | ||
directory: ./artifacts/ | ||
|
||
reporters: | ||
spotlight: # Prints an overview of failed or otherwise interesting jobs. | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
# Check if saucectl is installed | ||
if ! command -v saucectl &> /dev/null; then | ||
echo "saucectl is not installed. Installing saucectl..." | ||
# Install saucectl via npm (assuming npm is installed) | ||
npm install -g saucectl | ||
fi | ||
|
||
# Check if SAUCE_USERNAME and SAUCE_ACCESS_KEY are set | ||
if [[ -n "$SAUCE_USERNAME" && -n "$SAUCE_ACCESS_KEY" ]]; then | ||
echo "SAUCE_USERNAME and SAUCE_ACCESS_KEY are set. Configuring saucectl..." | ||
#saucectl configure | ||
else | ||
echo "SAUCE_USERNAME or SAUCE_ACCESS_KEY is not set. Skipping saucectl configuration." | ||
exit 1 | ||
fi | ||
|
||
cd ../../.. | ||
|
||
rm -rf DummyDistributionPackages || true | ||
mv DistributionPackages DummyDistributionPackages | ||
mkdir DistributionPackages | ||
|
||
ln -s "../Packages/Application/Neos.Neos.Ui/Tests/IntegrationTests/SharedNodeTypesPackage" DistributionPackages/Neos.TestNodeTypes | ||
|
||
for fixture in Packages/Application/Neos.Neos.Ui/Tests/IntegrationTests/Fixtures/*/; do | ||
echo "$fixture" | ||
|
||
ln -s "../${fixture}SitePackage" DistributionPackages/Neos.TestSite | ||
|
||
# TODO: optimize this | ||
composer reinstall neos/test-nodetypes | ||
composer reinstall neos/test-site | ||
# make sure neos is installed even if patching led to the removal (bug) | ||
composer update neos/neos-development-collection | ||
./flow flow:cache:flush --force | ||
./flow flow:cache:warmup | ||
./flow configuration:show --path Neos.ContentRepository.contentDimensions | ||
|
||
if ./flow site:list | grep -q 'Node name'; then | ||
./flow site:prune '*' | ||
fi | ||
./flow site:import --package-key=Neos.TestSite | ||
./flow resource:publish | ||
|
||
cd Packages/Application/Neos.Neos.Ui | ||
saucectl run | ||
cd ../../.. | ||
rm -f DistributionPackages/Neos.TestSite | ||
|
||
done | ||
|
||
rm -rf DistributionPackages | ||
mv DummyDistributionPackages DistributionPackages |