feat: finished images/files previews #688
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: | |
cypress-run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/.next/cache | |
key: nextjs-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/*.ts', '**/*.tsx') }} | |
restore-keys: | | |
nextjs-${{ hashFiles('yarn.lock') }}- | |
- name: Run cypress | |
uses: cypress-io/github-action@v4 | |
with: | |
build: yarn build | |
start: yarn start | |
wait-on: ${{ secrets.APP_URL }} | |
wait-on-timeout: 300 | |
env: | |
NEXT_PUBLIC_ALEPH_CHANNEL: ${{ secrets.NEXT_PUBLIC_ALEPH_CHANNEL }} | |
NEXT_PUBLIC_GITCLONE_DIR: ${{ secrets.NEXT_PUBLIC_GITCLONE_DIR }} | |
NEXT_PUBLIC_GITHUB_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_GITHUB_CLIENT_ID }} | |
NEXT_PUBLIC_GITHUB_CLIENT_SECRET: ${{ secrets.NEXT_PUBLIC_GITHUB_CLIENT_SECRET }} | |
NEXTAUTH_URL: ${{ secrets.APP_URL }} | |
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | |
- name: Get screenshots | |
uses: actions/upload-artifact@v1 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
- name: Get videos | |
uses: actions/upload-artifact@v1 | |
if: failure() | |
with: | |
name: cypress-videos | |
path: cypress/videos |