Cloudlog/.github/workflows/cypress-tests.yml

46 wiersze
1.0 KiB
YAML
Czysty Zwykły widok Historia

2024-04-05 20:36:16 +00:00
name: Cypress Tests
on: [pull_request]
jobs:
2024-04-07 19:09:45 +00:00
cypress-e2e-tests:
2024-04-05 20:36:16 +00:00
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-
2024-04-05 20:36:16 +00:00
- name: Setup .env
run: |
if [ ! -f .env ]; then
cp .env.sample .env
fi
2024-04-05 20:36:16 +00:00
- name: Build Docker services
run: docker-compose up -d
- name: Wait for services to start
2024-04-08 01:18:29 +00:00
run: sleep 5
2024-04-08 00:58:37 +00:00
- name: Populate dxcc_entities table
run: curl "http://localhost/index.php/update/dxcc"
2024-04-05 20:36:16 +00:00
- name: Run Cypress tests
run: npx cypress run