Initial support for Github Action Cypress CI
This commit is contained in:
parent
73507e9627
commit
da656bbac6
|
@ -48,13 +48,10 @@ jobs:
|
||||||
- name: Shutdown Ubuntu MySQL (SUDO)
|
- name: Shutdown Ubuntu MySQL (SUDO)
|
||||||
run: sudo service mysql stop
|
run: sudo service mysql stop
|
||||||
|
|
||||||
- name: Start MariaDB
|
- uses: mirromutth/mysql-action@v1.1
|
||||||
uses: getong/mariadb-action@v1.1
|
|
||||||
with:
|
with:
|
||||||
mysql root password: password
|
mysql user: 'user'
|
||||||
mysql database: allerta
|
mysql password: 'password'
|
||||||
mysql user: user
|
|
||||||
mysql password: password
|
|
||||||
|
|
||||||
- name: Validate composer.json and composer.lock
|
- name: Validate composer.json and composer.lock
|
||||||
run: composer validate
|
run: composer validate
|
||||||
|
@ -62,28 +59,36 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --prefer-dist --no-progress
|
run: composer install --prefer-dist --no-progress
|
||||||
|
|
||||||
- name: Run test suite
|
- name: Cypress run
|
||||||
run: vendor/bin/codecept run --steps
|
uses: cypress-io/github-action@v2
|
||||||
|
|
||||||
- name: Upload Tests Artifact
|
|
||||||
if: ${{ always() }}
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
with:
|
||||||
name: tests output (php ${{ matrix.php-versions }})
|
record: true
|
||||||
path: ./server/tests/_output
|
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
|
- name: Remove devs files and dirs
|
||||||
if: "${{ success() }}"
|
if: "${{ success() }}"
|
||||||
run: |
|
run: |
|
||||||
rm codeception.yml
|
rm *.json *.lock
|
||||||
sudo rm tests vendor -r
|
sudo rm cypress vendor -r
|
||||||
cd risorse
|
cd risorse
|
||||||
webpack -p
|
webpack -p
|
||||||
sudo rm node_modules src -r
|
sudo rm node_modules src -r
|
||||||
rm package*.json
|
rm package*.json
|
||||||
rm webpack.*.js
|
rm webpack.*.js
|
||||||
cd ..
|
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
|
- name: Upload prod build
|
||||||
if: "${{ success() }}"
|
if: "${{ success() }}"
|
||||||
|
|
|
@ -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
|
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"baseUrl": "http://localhost:8080"
|
"baseUrl": "http://localhost:8080",
|
||||||
}
|
"projectId": "4ty9gy"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue