main #21
1 changed files with 13 additions and 2 deletions
|
@ -46,6 +46,12 @@ jobs:
|
||||||
path: ~/.cache/Cypress
|
path: ~/.cache/Cypress
|
||||||
key: cypress-${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}
|
key: cypress-${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}
|
||||||
|
|
||||||
|
- name: Cache Node modules
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: node_modules
|
||||||
|
key: node-modules-${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}
|
||||||
|
|
||||||
- name: Install Cypress
|
- name: Install Cypress
|
||||||
run: npx cypress install
|
run: npx cypress install
|
||||||
|
|
||||||
|
@ -78,11 +84,16 @@ jobs:
|
||||||
name: build
|
name: build
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
|
- name: Restore Node modules cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
name: node-modules
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: npm run test:unit
|
run: npm run test:unit
|
||||||
|
|
||||||
cypress-tests:
|
cypress-tests:
|
||||||
name: Run E2E tests
|
name: Run E2E tests (${{ matrix.browser }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: install
|
needs: install
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -109,7 +120,7 @@ jobs:
|
||||||
run: sudo apt-get update && sudo apt-get install -y ${{ env.APT_PACKAGES }}
|
run: sudo apt-get update && sudo apt-get install -y ${{ env.APT_PACKAGES }}
|
||||||
|
|
||||||
- name: Cypress run (${{ matrix.browser }})
|
- name: Cypress run (${{ matrix.browser }})
|
||||||
uses: cypress-io/github-action@v6
|
uses: https://github.com/cypress-io/github-action@v6
|
||||||
with:
|
with:
|
||||||
start: npm start
|
start: npm start
|
||||||
browser: ${{ matrix.browser }}
|
browser: ${{ matrix.browser }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue