mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-21 17:37:01 +01:00
Bump Circle CI docker image (#18914)
* Bump Circle CI docker image * Stop removing FF since it doesn't exist * Use Circle CI browser tools * Fix config name * Fix browser tools args * Fix Chrome version * Use script for chrome * Try update * Try FF without browser-tools2 * Fix FF binary path * Force enable e2e debug * Add some logs * More logs * Disable XSET check for now * Delete x-server logic * remove another usage of the x-server logic
This commit is contained in:
parent
abd6df72c6
commit
55d974d7b2
@ -3,10 +3,10 @@ version: 2.1
|
||||
executors:
|
||||
node-browsers:
|
||||
docker:
|
||||
- image: circleci/node:16-browsers
|
||||
- image: cimg/node:16.20-browsers
|
||||
node-browsers-medium-plus:
|
||||
docker:
|
||||
- image: circleci/node:16-browsers
|
||||
- image: cimg/node:16.20-browsers
|
||||
resource_class: medium+
|
||||
environment:
|
||||
NODE_OPTIONS: --max_old_space_size=2048
|
||||
|
@ -4,6 +4,8 @@ set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
# To get the latest version, see <https://www.ubuntuupdates.org/ppa/google_chrome?dist=stable>
|
||||
CHROME_VERSION='111.0.5563.64-1'
|
||||
CHROME_BINARY="google-chrome-stable_${CHROME_VERSION}_amd64.deb"
|
||||
|
@ -9,10 +9,6 @@ FIREFOX_BINARY="firefox-${FIREFOX_VERSION}.tar.bz2"
|
||||
FIREFOX_BINARY_URL="https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/${FIREFOX_BINARY}"
|
||||
FIREFOX_PATH='/opt/firefox'
|
||||
|
||||
printf '%s\n' "Removing old Firefox installation"
|
||||
|
||||
sudo rm -r "${FIREFOX_PATH}"
|
||||
|
||||
printf '%s\n' "Downloading & installing Firefox ${FIREFOX_VERSION}"
|
||||
|
||||
wget --quiet --show-progress -O- "${FIREFOX_BINARY_URL}" | sudo tar xj -C /opt
|
||||
|
@ -10,7 +10,6 @@ const FixtureServer = require('./fixture-server');
|
||||
const PhishingWarningPageServer = require('./phishing-warning-page-server');
|
||||
const { buildWebDriver } = require('./webdriver');
|
||||
const { PAGES } = require('./webdriver/driver');
|
||||
const { ensureXServerIsRunning } = require('./x-server');
|
||||
const GanacheSeeder = require('./seeder/ganache-seeder');
|
||||
|
||||
const tinyDelayMs = 200;
|
||||
@ -107,12 +106,7 @@ async function withFixtures(options, testSuite) {
|
||||
}
|
||||
const mockedEndpoint = await setupMocking(mockServer, testSpecificMock);
|
||||
await mockServer.start(8000);
|
||||
if (
|
||||
process.env.SELENIUM_BROWSER === 'chrome' &&
|
||||
process.env.CI === 'true'
|
||||
) {
|
||||
await ensureXServerIsRunning();
|
||||
}
|
||||
|
||||
driver = (await buildWebDriver(driverOptions)).driver;
|
||||
webDriver = driver.driver;
|
||||
|
||||
|
@ -11,7 +11,6 @@ const {
|
||||
} = require('./helpers');
|
||||
const { buildWebDriver } = require('./webdriver');
|
||||
const Ganache = require('./ganache');
|
||||
const { ensureXServerIsRunning } = require('./x-server');
|
||||
|
||||
const ganacheServer = new Ganache();
|
||||
const dappPort = 8080;
|
||||
@ -45,12 +44,6 @@ describe('MetaMask', function () {
|
||||
dappServer.on('listening', resolve);
|
||||
dappServer.on('error', reject);
|
||||
});
|
||||
if (
|
||||
process.env.SELENIUM_BROWSER === 'chrome' &&
|
||||
process.env.CI === 'true'
|
||||
) {
|
||||
await ensureXServerIsRunning();
|
||||
}
|
||||
const result = await buildWebDriver();
|
||||
driver = result.driver;
|
||||
await driver.navigate();
|
||||
|
@ -42,6 +42,9 @@ class FirefoxDriver {
|
||||
'browser.download.dir',
|
||||
`${process.cwd()}/test-artifacts/downloads`,
|
||||
);
|
||||
if (process.env.CI === 'true') {
|
||||
options.setBinary('/opt/firefox/firefox');
|
||||
}
|
||||
const builder = new Builder()
|
||||
.forBrowser('firefox')
|
||||
.setFirefoxOptions(options);
|
||||
|
@ -1,17 +0,0 @@
|
||||
const { runCommand } = require('../../development/lib/run-command');
|
||||
const { retry } = require('../../development/lib/retry');
|
||||
|
||||
function ensureXServerIsRunning() {
|
||||
return retry(
|
||||
{
|
||||
retries: 3,
|
||||
delay: 2000,
|
||||
rejectionMessage: 'X server does not seem to be running?!',
|
||||
},
|
||||
() => {
|
||||
return runCommand('xset', ['q']);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = { ensureXServerIsRunning };
|
Loading…
Reference in New Issue
Block a user