diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index ba638d6..581540c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -48,13 +48,10 @@ jobs: - name: Shutdown Ubuntu MySQL (SUDO) run: sudo service mysql stop - - name: Start MariaDB - uses: getong/mariadb-action@v1.1 + - uses: mirromutth/mysql-action@v1.1 with: - mysql root password: password - mysql database: allerta - mysql user: user - mysql password: password + mysql user: 'user' + mysql password: 'password' - name: Validate composer.json and composer.lock run: composer validate @@ -62,28 +59,36 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-progress - - name: Run test suite - run: vendor/bin/codecept run --steps - - - name: Upload Tests Artifact - if: ${{ always() }} - uses: actions/upload-artifact@v2 + - name: Cypress run + uses: cypress-io/github-action@v2 with: - name: tests output (php ${{ matrix.php-versions }}) - path: ./server/tests/_output + record: true + env: + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + record: true, + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + start: php -S 0.0.0.0:8080 + working-directory: server + tag: php-${{ matrix.php-versions }} + + - uses: actions/upload-artifact@v1 + if: failure() + with: + name: cypress_screenshots_php-${{ matrix.php-versions }} + path: cypress/screenshots - name: Remove devs files and dirs if: "${{ success() }}" run: | - rm codeception.yml - sudo rm tests vendor -r + rm *.json *.lock + sudo rm cypress vendor -r cd risorse webpack -p sudo rm node_modules src -r rm package*.json rm webpack.*.js cd .. - composer install --no-dev --no-progress --no-suggest -o -n -d server + composer install --no-dev --no-progress --no-suggest -o -n - name: Upload prod build if: "${{ success() }}" diff --git a/server/codeception.yml b/server/codeception.yml deleted file mode 100644 index a0d8b93..0000000 --- a/server/codeception.yml +++ /dev/null @@ -1,10 +0,0 @@ -paths: - tests: tests - output: tests/_output - data: tests/_data - support: tests/_support - envs: tests/_envs -actor_suffix: Tester -extensions: - enabled: - - Codeception\Extension\RunFailed \ No newline at end of file diff --git a/server/cypress.json b/server/cypress.json index 489903c..018ee0e 100644 --- a/server/cypress.json +++ b/server/cypress.json @@ -1,3 +1,4 @@ { - "baseUrl": "http://localhost:8080" -} \ No newline at end of file + "baseUrl": "http://localhost:8080", + "projectId": "4ty9gy" +}