This file contains hidden or 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
const { defineConfig } = require("cypress"); | |
const fs = require("fs"); | |
module.exports = defineConfig({ | |
video: true, | |
videoUploadOnPasses: true, | |
e2e: { | |
baseUrl: "https://en.wikipedia.org/", | |
specPattern: "cypress/integration/*.spec.js", | |
supportFile: "cypress/support/e2e.js", |
This file contains hidden or 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
image: cypress/base:14.16.0 | |
## job definition for running E2E tests in parallel | |
e2e: &e2e | |
name: E2E tests | |
caches: | |
- node | |
- cypress | |
script: | |
- yarn install --frozen-lockfile |
This file contains hidden or 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
const failOnTimeout = (timeout = 10000) => { | |
return setTimeout(() => { | |
Cypress.runner.stop(); | |
throw new Error("Timeout"); | |
}, timeout); | |
}; | |
describe("All tests", function () { | |
before(failOnTimeout); |
This file contains hidden or 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
// A generic "retry" mechanism | |
// Will retry invoking `fn` until it succeeds or will throw the latest exception | |
const withRetries = | |
<T extends (...args: any[]) => any, R = ReturnType<T>>( | |
fn: T, | |
retriesCount: number = 5 | |
) => | |
async (...args: Parameters<T>): Promise<R> => { | |
let i = retriesCount; | |
let error; |
This file contains hidden or 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
default: | |
image: cypress/base:14 | |
stages: | |
- test | |
test: | |
image: cypress/browsers:node12.14.1-chrome85-ff81 | |
stage: test | |
parallel: 50 |
This file contains hidden or 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
// @ts-ignore | |
import isSsh from 'is-ssh'; | |
// @ts-ignore | |
import parsePath from 'parse-path'; | |
export function gitUrlParse(url: string) { | |
if (typeof url !== 'string') { | |
throw new Error('The url must be a string.'); | |
} |
This file contains hidden or 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
j,........D" ≈xc≥≥≥≥≥ | |
) | |
hguhv m hgfcr4frdfvfv); j,........D"≥≥≥≥≥ | |
); j,........D"≥≥≥≥≥ | |
); j,........D"≥≥≥≥≥ |
This file contains hidden or 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
#!/usr/bin/env node | |
const { readFileSync, writeFileSync } = require('fs'); | |
const { parse } = require('node-html-parser'); | |
const { resolve } = require('path'); | |
const modernPath = resolve(__dirname, '..', 'dist', 'modern.html'); | |
const legacyPath = resolve(__dirname, '..', 'dist', 'legacy.html'); | |
const outputPath = resolve(__dirname, '..', 'dist', 'index.html'); |
This file contains hidden or 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
# get version id | |
query($name: String!, $owner: String!) { | |
repository(name: $name, owner: $owner) { | |
id | |
name | |
registryPackages(first: 10) { | |
nodes { | |
versions(first: 10) { | |
nodes{ | |
id |
This file contains hidden or 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
#!/bin/sh | |
DIRECTORY=$(cd `dirname $0` && pwd) | |
cd $DIRECTORY/.. | |
echo "Adding GitHub registry credentials to $DIRECTORY/../.npmrc" | |
echo "\n//npm.pkg.github.com/:_authToken=$GITHUB_SECRET" >> .npmrc |
NewerOlder