v2.36.6 #6598
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: End-to-end tests | |
on: [push] | |
jobs: | |
e2e: | |
name: End-to-end tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
# added -vX just to reset the cache, feel free to up it if you need | |
# to reset the cache again | |
cache-name: cache-node-modules-v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
- name: Install npm dependencies | |
env: | |
PUPPETEER_SKIP_DOWNLOAD: 'true' | |
run: npm install | |
- name: Build monorepo packages | |
run: npm run build | |
- name: Run cypress | |
run: npm run test-e2e | |
env: | |
CYPRESS_SANITY_SESSION_TOKEN: ${{ secrets.CYPRESS_SANITY_SESSION_TOKEN }} | |
- name: Archive videos | |
uses: actions/upload-artifact@v2 | |
with: | |
name: videos | |
path: cypress/videos | |
# Make sure this step runs even though the test steps fails. | |
# Otherwise we won't get videos if tests fail. | |
if: ${{ always() }} | |
- name: Archive screenshots | |
uses: actions/upload-artifact@v2 | |
with: | |
name: screenshots | |
path: cypress/screenshots | |
# Make sure this step runs even though the test steps fails. | |
# Otherwise we won't get videos if tests fail. | |
if: ${{ always() }} |