e2e-tests.yml
1 name: Run e2e tests 2 on: [pull_request, workflow_dispatch] 3 4 jobs: 5 e2e-tests: 6 runs-on: ubuntu-latest 7 steps: 8 - name: Check out code 9 uses: actions/checkout@v2 10 11 - uses: actions/setup-node@v3 12 with: 13 node-version: 20 14 cache: 'npm' 15 16 - name: Cache dependencies 17 uses: actions/cache@v2 18 with: 19 path: ~/.npm 20 key: npm-${{ hashFiles('package-lock.json') }} 21 restore-keys: npm- 22 23 - name: Populate .env file 24 uses: SpicyPizza/create-envfile@v1.3 25 with: 26 envkey_PINATA_SDK_KEY: ${{ secrets.PINATA_SDK_KEY }} 27 envkey_PINATA_SDK_SECRET: ${{ secrets.PINATA_SDK_SECRET }} 28 envkey_TENDERLY_ACCESS_SECRET: ${{ secrets.TENDERLY_ACCESS_SECRET }} 29 envkey_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }} 30 envkey_TENDERLY_USER: ${{ secrets.TENDERLY_USER }} 31 envkey_GELATO_API_KEY: ${{ secrets.GELATO_API_KEY }} 32 envkey_COINMARKETCAP_API_KEY: ${{ secrets.COINMARKETCAP_API_KEY }} 33 envkey_PUBLIC_NETWORK: 5 34 # GQL URL is localhost, where the GQL API will run in Docker, but we generate GQL types 35 # later from the production GQL API in order to ensure this PR is aligned with the currently-deployed 36 # GQL schema once merged. 37 envkey_GQL_URL: http://localhost:8080 38 envkey_GQL_ACCESS_TOKEN: ${{ secrets.GQL_ACCESS_TOKEN }} 39 envkey_PUBLIC_PINATA_GATEWAY_URL: http://localhost:3000 40 envkey_GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB }} 41 42 - name: Install dependencies 43 run: npm ci 44 45 - name: Build GQL types 46 run: GQL_URL=https://drips-api-mainnet-s1.up.railway.app/ npm run build:graphql 47 48 - name: Install Playwright Browsers 49 run: npx playwright install --with-deps 50 51 - name: Svelte Kit Sync 52 run: npx svelte-kit sync 53 54 - name: Run E2E tests 55 run: GQL_URL=http://localhost:8080 npm run e2e