kopia lustrzana https://github.com/magicbug/Cloudlog
46 wiersze
1.0 KiB
YAML
46 wiersze
1.0 KiB
YAML
name: Cypress Tests
|
|
on: [pull_request]
|
|
jobs:
|
|
cypress-e2e-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cache Cypress
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.cache/Cypress
|
|
key: cypress-${{ hashFiles('package-lock.json') }}
|
|
restore-keys: |
|
|
cypress-
|
|
|
|
- name: Install Cypress
|
|
run: npm install cypress
|
|
|
|
- name: Cache .env
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: .env
|
|
key: .env-${{ hashFiles('.env.sample') }}
|
|
restore-keys: |
|
|
.env-
|
|
|
|
- name: Setup .env
|
|
run: |
|
|
if [ ! -f .env ]; then
|
|
cp .env.sample .env
|
|
fi
|
|
|
|
- name: Build Docker services
|
|
run: docker-compose up -d
|
|
|
|
- name: Wait for services to start
|
|
run: sleep 5
|
|
|
|
- name: Populate dxcc_entities table
|
|
run: curl "http://localhost/index.php/update/dxcc"
|
|
|
|
- name: Run Cypress tests
|
|
run: npx cypress run
|