Skip to content

Commit

Permalink
Fix workflow for ui testing
Browse files Browse the repository at this point in the history
  • Loading branch information
magicbug committed Oct 30, 2024
1 parent 0d37cb7 commit 050de77
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cache Node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-
- name: Install dependencies
run: npm install

- name: Cache Cypress
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: cypress-${{ hashFiles('package-lock.json') }}
Expand All @@ -19,7 +30,7 @@ jobs:
run: npm install cypress

- name: Cache .env
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .env
key: .env-${{ hashFiles('.env.sample') }}
Expand All @@ -36,10 +47,15 @@ jobs:
run: docker-compose up -d

- name: Wait for services to start
run: sleep 5
run: |
for i in `seq 1 30`; do
curl -s http://localhost:80 > /dev/null && break
echo "Waiting for services to start..."
sleep 5
done
- name: Populate dxcc_entities table
run: curl "http://localhost/index.php/update/dxcc"

- name: Run Cypress tests
run: npx cypress run
run: npx cypress run

0 comments on commit 050de77

Please sign in to comment.