15 Commits

Author SHA1 Message Date
d20702f248 Fix OK button clicked : more elegant
All checks were successful
Test, build and push image to registry / phpunit-tests (push) Successful in 1m52s
Test, build and push image to registry / build-image (push) Successful in 2m46s
2025-11-07 12:08:40 +01:00
5b5f35e9ce Fix OK button clicked
Some checks failed
Test, build and push image to registry / build-image (push) Has been cancelled
Test, build and push image to registry / phpunit-tests (push) Has been cancelled
2025-11-07 12:07:56 +01:00
fb2a346804 Cache
All checks were successful
Test, build and push image to registry / phpunit-tests (push) Successful in 1m53s
Test, build and push image to registry / build-image (push) Successful in 26s
2025-11-07 10:44:15 +01:00
2611701d53 Fix giveaway prize name #2
Some checks failed
Test, build and push image to registry / phpunit-tests (push) Successful in 4m22s
Test, build and push image to registry / build-image (push) Has been cancelled
2025-11-07 10:03:30 +01:00
c61750285a Fix giveaway prize name
Some checks failed
Test, build and push image to registry / build-image (push) Has been cancelled
Test, build and push image to registry / phpunit-tests (push) Has been cancelled
2025-11-07 10:02:30 +01:00
12280c6d54 Selenium Undetected Standalone Chromedriver README with bugfix
All checks were successful
Test, build and push image to registry / phpunit-tests (push) Successful in 6m35s
Test, build and push image to registry / build-image (push) Successful in 5m6s
2025-11-07 09:10:29 +01:00
6853fbef46 Fix CICD caches
All checks were successful
Test, build and push image to registry / phpunit-tests (push) Successful in 6m43s
Test, build and push image to registry / build-image (push) Successful in 5m41s
2025-11-06 23:49:24 +01:00
29077ed6d6 Added caches to CICD
Some checks failed
Test, build and push image to registry / phpunit-tests (push) Successful in 8m28s
Test, build and push image to registry / build-image (push) Has been cancelled
2025-11-06 23:37:30 +01:00
a162bb2c1f Fix CI test
Some checks failed
Test, build and push image to registry / phpunit-tests (push) Successful in 1m58s
Test, build and push image to registry / build-image (push) Has been cancelled
2025-11-06 23:32:29 +01:00
7d26440d0c Fix eldorado prices
Some checks failed
Test, build and push image to registry / phpunit-tests (push) Failing after 1m33s
Test, build and push image to registry / build-image (push) Has been skipped
2025-11-06 23:29:49 +01:00
45a40ae999 Caption in english
Some checks failed
Test, build and push image to registry / phpunit-tests (push) Failing after 1m31s
Test, build and push image to registry / build-image (push) Has been skipped
2025-11-06 17:40:28 +01:00
266d444922 Add empty tests/Unit directory
All checks were successful
Test, build and push image to registry / phpunit-tests (push) Successful in 1m53s
Test, build and push image to registry / build-image (push) Successful in 3m14s
2025-11-06 17:34:41 +01:00
24360d86b3 Put everything in same workflow
Some checks failed
Test, build and push image to registry / phpunit-tests (push) Failing after 1m58s
Test, build and push image to registry / build-image (push) Has been skipped
2025-11-06 17:28:44 +01:00
5ce8fbd444 fix php version
Some checks failed
Launch the PHPunit tests / phpunit-tests (push) Failing after 1m52s
Push image to registry / build-image (push) Has been cancelled
2025-11-06 17:25:31 +01:00
82460aa727 Only run if tests suceeded
Some checks failed
Push image to registry / build-image (push) Has been cancelled
Launch the PHPunit tests / phpunit-tests (push) Has been cancelled
2025-11-06 17:24:46 +01:00
9 changed files with 50 additions and 28 deletions

View File

@@ -1,12 +1,34 @@
name: Push image to registry
name: Test, build and push image to registry
on:
push:
branches:
- main
jobs:
phpunit-tests:
runs-on: ubuntu-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3.0'
- name: Cache Composer
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
- name: Run PHPUnit tests
run: vendor/bin/phpunit --configuration phpunit.xml
build-image:
needs: phpunit-tests
if: success() && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Check out repository code
@@ -17,6 +39,13 @@ jobs:
registry: git.matthiasg.dev
username: ninluc
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Cache Docker layers (registry-backed)
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: buildx-cache-${{ github.sha }}
restore-keys: |
buildx-cache-
- name: Build and push
run: |
docker build -t git.matthiasg.dev/ninluc/datbrowser:latest .

View File

@@ -1,19 +0,0 @@
name: Launch the PHPunit tests
on:
push:
jobs:
phpunit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Install dependencies
run: composer install
- name: Run PHPUnit tests
run: vendor/bin/phpunit --configuration phpunit.xml

View File

@@ -2,7 +2,6 @@
namespace App\Browser\Jobs\EldoradoRobuxPriceSentry;
use App\Browser\Jobs\HellcaseBattles\EldoradoRobuxPriceNotificationBody;
use App\Models\Job;
use App\Notification\Notification;
use App\Notification\Stringifiable;
@@ -18,7 +17,7 @@ class EldoradoRobuxPriceNotification extends Notification {
parent::__construct($jobId);
$this->price = $price;
$this->threshold = Job::find($jobId)->jobInfosTable()->get('eldorado_robux_price_threshold');
$this->threshold = floatval(Job::find($jobId)->jobInfosTable()->get('eldorado_robux_price_threshold'));
$this->link = $link;
$this->setBody($this->generateBody());

View File

@@ -94,11 +94,10 @@ class EldoradoRobuxPriceSentryJob extends BrowserJob implements ShouldBeUniqueUn
$lowestPriceElement = $browser->driver->findElement(WebDriverBy::xpath('(//eld-offer-price)[2]/strong'));
$lowestPriceText = $lowestPriceElement->getText(); // Ex: " 0,00478 € "
$lowestPrice = $this->textToFloat($lowestPriceText);
$lowestPrice = $lowestPrice / 1000; // Price per Robux
//$lowestPrice = $lowestPrice / 1000; // Price per Robux
// TODO : Look at the entire text to try to understand if it is per 1k or per single Robux
$threshold = $this->textToFloat($this->jobInfos->get("eldorado_robux_price_threshold"));
dump($threshold);
Log::info("EldoradoRobuxPriceSentryJob: lowest price = $lowestPrice €, threshold = $threshold");
$this->jobRun->addArtifact(new JobArtifact([

View File

@@ -209,7 +209,7 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
// JobRun
// Get the elements text containing class starting with giveaway-entity-prize__
$prizeElement = $browser->driver->findElements(WebDriverBy::xpath('//div[starts-with(@class, "giveaway-entity-prize__")]'));
$prizeElement = $browser->driver->findElements(WebDriverBy::xpath('//div[starts-with(@class, "_giveaway_")]//div[contains(@class, "_main_dv7x6_48")]'));
// Join their text
$prize = "";
foreach ($prizeElement as $element) {

View File

@@ -104,7 +104,7 @@ abstract class InstagramAbstractJob extends BrowserJob implements ShouldBeUnique
$popupsTypes = [
['//button[contains(text(), "Allow all cookies")]'], // Allow all cookies
['//button[contains(text(), "Not Now")]', ["Popup Not Now clicked"]], // Not now
['//button|//div[contains(text(), "OK")]', ["Popup Ok clicked"]], // OK
['(//button|//div)[contains(text(), "OK")]', ["Popup Ok clicked"]], // OK
];
foreach ($popupsTypes as $popup) {

View File

@@ -451,6 +451,7 @@ Captions must:
4. Encourage engagement relevant to the platform's algorithm (e.g., asking a question related to the joke/scene).
5. Optionally include relevant hashtags at the end (#hashtagsOnly), chosen appropriately for the reel's content or vibe. Use common tags if no specific ones are provided, but avoid overly generic ones unless fitting.
6. If credit information is provided in the input (e.g., `credit: twitteruser`), acknowledge it minimally within the caption text *using only that source*. Do not invent any account handles (`@`) or platform prefixes (`tt/`). Use phrases like \"Credited to...\" or simply insert the credited name if appropriate, but don't force it unless the core concept naturally includes attribution. If no credit is provided, do not mention a specific creator.
7. Be in english.
**Do Not:**
* Start captions with 'This reel...' or similar intros.

0
tests/Unit/.gitkeep Normal file
View File

View File

@@ -0,0 +1,13 @@
# Selenium Undetected Standalone-Chromedriver
Selenium Standalone-Chromedriver with Undected-Chromedriver applied
## Bug
```txt
Could not start a new session. Response code 500. Message: session not created: probably user data directory is already in use,
```
Go into the `/home/seluser` director in the container and run `rm -rf ~/.config/google-chrome/Singleton*`
If it doesn't work, the log can be found in the set profile folder in the file `chrome_debug.log`