Skip to content

Commit

Permalink
Merge pull request #2 from belka-tech/e2e_tests
Browse files Browse the repository at this point in the history
E2E tests
  • Loading branch information
solodkiy authored Oct 1, 2024
2 parents 573faf7 + df3e0a8 commit a9b55c1
Show file tree
Hide file tree
Showing 7 changed files with 256 additions and 218 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,42 @@ jobs:
asset_path: gauge-exporter
asset_name: gauge-exporter
asset_content_type: application/octet-stream

e2e_test:
name: E2E Tests
runs-on: ubuntu-latest
needs: [compile] # Ensure release only happens after compile

steps:
- uses: actions/checkout@v3

- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: gauge-exporter

- name: Make gauge-exporter executable
run: chmod +x ./gauge-exporter

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- name: Cache Composer packages
uses: actions/cache@v3
with:
path: e2e_tests/vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/e2e_tests/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: |
cd e2e_tests
composer install --prefer-dist -n --no-ansi
- name: Run E2E tests
run: |
cd e2e_tests
./vendor/bin/phpunit --testdox
14 changes: 4 additions & 10 deletions e2e_tests/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "belkacar/gauge-exporter-tests",
"license": "proprietary",
"name": "belka-tech/gauge-exporter-tests",
"license": "MIT",
"type": "project",
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -11,17 +11,11 @@
"guzzlehttp/guzzle": "^7.8",
"phpunit/phpunit": "~11.1.0",
"symfony/process": "^7.0",
"belkacar/gauge-exporter-client": "0.2.0"
},
"repositories": {
"belkacar": {
"type": "composer",
"url": "https://gitlab.belkacar.ru/api/v4/group/php-backend/-/packages/composer/packages.json"
}
"belka-tech/gauge-exporter-client": "0.1.0"
},
"autoload": {
"psr-4": {
"BelkaCar\\GaugeExporterTests\\": "tests"
"BelkaTech\\GaugeExporterTests\\": "tests"
}
},
"config": {
Expand Down
Loading

0 comments on commit a9b55c1

Please sign in to comment.