From 485c21a1eb030ca337b503d52ff166a5ddec990f Mon Sep 17 00:00:00 2001 From: Patrick Burns Date: Sun, 7 Apr 2024 20:16:12 -0500 Subject: [PATCH] attempting to add some caching and speed up the delay --- .github/workflows/cypress-tests.yml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cypress-tests.yml b/.github/workflows/cypress-tests.yml index 92cc4d1a9..f16d68c48 100644 --- a/.github/workflows/cypress-tests.yml +++ b/.github/workflows/cypress-tests.yml @@ -7,20 +7,39 @@ jobs: - 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: cp .env.sample .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 10 + run: sleep 3 - name: Populate dxcc_entities table run: curl "http://localhost/index.php/update/dxcc" - - name: Install Cypress - run: npm install cypress - - name: Run Cypress tests run: npx cypress run