Skip to content

Commit

Permalink
chore: try insecure firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov committed Nov 11, 2023
1 parent 722d3a0 commit 53315d9
Show file tree
Hide file tree
Showing 18 changed files with 54 additions and 59 deletions.
8 changes: 6 additions & 2 deletions .github/actions/docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ inputs:
default: "false"
target:
description: "Target stage within Dockerfile: dapi, drive-abci, dashmate-helper, test-suite"
platform:
description: Platform to build for. i.e linux/amd64 or linux/arm64
required: true
dockerhub_username:
description: User name to use when pushing images to Docker Hub
dockerhub_token:
Expand Down Expand Up @@ -89,9 +92,9 @@ runs:
with:
script: |
if ('${{ inputs.push_tags}}' != 'true') {
core.setOutput('tags', '');
core.setOutput('tags', '');
} else {
core.setOutput('tags', '${{ steps.docker_meta.outputs.tags }}');
core.setOutput('tags', '${{ steps.docker_meta.outputs.tags }}');
}
- name: Build and push Docker image ${{ inputs.image }}
Expand All @@ -103,6 +106,7 @@ runs:
target: ${{ inputs.target }}
labels: ${{ steps.docker_meta.outputs.labels }}
tags: ${{ steps.tags.outputs.tags }}
platforms: ${{ inputs.platform }}
build-args: |
CARGO_BUILD_PROFILE=${{ inputs.cargo_profile }}
RUSTC_WRAPPER=sccache
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
image_org: ${{ inputs.image_org }}
image_version: ${{ steps.version.outputs.result }}
target: ${{ inputs.target }}
platform: ${{ matrix.platform }}
cargo_profile: release
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
build-image:
name: Build ${{ inputs.name }} image
runs-on: [ "self-hosted", "linux", "arm64-4x", "ubuntu-platform" ]
runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
steps:
- name: Check out repo
uses: actions/checkout@v4
Expand All @@ -39,6 +39,7 @@ jobs:
image_name: ${{ inputs.image_name }}
image_org: ${{ vars.AWS_ACCOUNT_ID }}.dkr.ecr.${{ vars.AWS_REGION }}.amazonaws.com
target: ${{ inputs.target }}
platform: linux/arm64
push_tags: true
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-build-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
jobs:
build-js:
name: Build JS
runs-on: [ "self-hosted", "linux", "arm64-4x", "ubuntu-platform" ]
runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
steps:
- name: Configure AWS credentials and bucket region
uses: aws-actions/configure-aws-credentials@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
timeout-minutes: 15
env:
CHROMIUM_BASED_BROWSER_NAME: EdgeHeadless
EDGE_BIN: /usr/bin/microsoft-edge
BROWSER_TESTS_INSECURE_BROWSER: FirefoxHeadlessInsecure
BROWSER_TESTS_CHROMIUM_BROWSER: ChromiumHeadless
steps:
- name: Check out repo
uses: actions/checkout@v4
Expand Down
16 changes: 2 additions & 14 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
4 changes: 1 addition & 3 deletions packages/js-dapi-client/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const karmaMochaReporter = require('karma-mocha-reporter');
const karmaChai = require('karma-chai');
const karmaChromeLauncher = require('karma-chrome-launcher');
const karmaFirefoxLauncher = require('karma-firefox-launcher');
const karmaChromiumEdgeLauncher = require('@chiragrupani/karma-chromium-edge-launcher');
const karmaWebpack = require('karma-webpack');
const webpackConfig = require('./webpack.config');

Expand Down Expand Up @@ -31,7 +30,7 @@ module.exports = (config) => {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: [process.env.CHROMIUM_BASED_BROWSER_NAME || 'ChromeHeadless', 'FirefoxHeadless'],
browsers: [process.env.BROWSER_TESTS_CHROMIUM_BROWSER || 'ChromeHeadless', 'FirefoxHeadless'],
singleRun: false,
concurrency: Infinity,
plugins: [
Expand All @@ -40,7 +39,6 @@ module.exports = (config) => {
karmaChai,
karmaChromeLauncher,
karmaFirefoxLauncher,
karmaChromiumEdgeLauncher,
karmaWebpack,
],
});
Expand Down
1 change: 0 additions & 1 deletion packages/js-dapi-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
},
"devDependencies": {
"@babel/core": "^7.15.5",
"@chiragrupani/karma-chromium-edge-launcher": "^2.3.1",
"assert-browserify": "^2.0.0",
"babel-loader": "^8.2.2",
"browserify-zlib": "^0.2.0",
Expand Down
16 changes: 11 additions & 5 deletions packages/js-dash-sdk/karma/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const karmaMocha = require('karma-mocha');
const karmaMochaReporter = require('karma-mocha-reporter');
const karmaChai = require('karma-chai');
const karmaChromeLauncher = require('karma-chrome-launcher');
const karmaChromiumEdgeLauncher = require('@chiragrupani/karma-chromium-edge-launcher');
const karmaFirefoxLauncher = require('karma-firefox-launcher');
const karmaWebpack = require('karma-webpack');
const webpackBaseConfig = require('../webpack.base.config');

Expand Down Expand Up @@ -35,7 +35,7 @@ module.exports = {
port: 9876,
colors: true,
autoWatch: false,
browsers: ['chromeWithoutSecurity'],
browsers: [process.env.BROWSER_TESTS_INSECURE_BROWSER || 'ChromeHeadlessInsecure'],
singleRun: false,
concurrency: Infinity,
browserNoActivityTimeout: 7 * 60 * 1000, // 30000 default
Expand All @@ -46,14 +46,20 @@ module.exports = {
karmaMochaReporter,
karmaChai,
karmaChromeLauncher,
karmaChromiumEdgeLauncher,
karmaFirefoxLauncher,
karmaWebpack,
],
customLaunchers: {
chromeWithoutSecurity: {
base: process.env.CHROMIUM_BASED_BROWSER_NAME || 'ChromeHeadless',
ChromeHeadlessInsecure: {
base: process.env.BROWSER_TESTS_CHROMIUM_BROWSER || 'ChromeHeadless',
flags: ['--allow-insecure-localhost'],
displayName: 'Chrome w/o security',
},
FirefoxHeadlessInsecure: {
base: 'FirefoxHeadless',
prefs: {
acceptInsecureCerts: true,
},
},
},
};
2 changes: 1 addition & 1 deletion packages/js-dash-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@chiragrupani/karma-chromium-edge-launcher": "^2.3.1",
"@types/chai": "^4.2.12",
"@types/dirty-chai": "^2.0.2",
"@types/expect": "^24.3.0",
Expand Down Expand Up @@ -82,6 +81,7 @@
"karma": "^6.4.1",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^2.1.2",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-webpack": "^5.0.0",
Expand Down
16 changes: 11 additions & 5 deletions packages/platform-test-suite/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const karmaMocha = require('karma-mocha');
const karmaMochaReporter = require('karma-mocha-reporter');
const karmaChai = require('karma-chai');
const karmaChromeLauncher = require('karma-chrome-launcher');
const karmaChromiumEdgeLauncher = require('@chiragrupani/karma-chromium-edge-launcher');
const karmaFirefoxLauncher = require('karma-firefox-launcher');
const karmaSourcemapLoader = require('karma-sourcemap-loader');
const karmaWebpack = require('karma-webpack');

Expand Down Expand Up @@ -68,24 +68,30 @@ module.exports = (config) => {
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
browsers: ['chromeWithoutSecurity'],
browsers: [process.env.BROWSER_TESTS_INSECURE_BROWSER || 'ChromeHeadlessInsecure'],
singleRun: true,
concurrency: Infinity,
plugins: [
karmaMocha,
karmaMochaReporter,
karmaChai,
karmaChromeLauncher,
karmaChromiumEdgeLauncher,
karmaFirefoxLauncher,
karmaSourcemapLoader,
karmaWebpack,
],
customLaunchers: {
chromeWithoutSecurity: {
base: process.env.CHROMIUM_BASED_BROWSER_NAME || 'ChromeHeadless',
ChromeHeadlessInsecure: {
base: process.env.BROWSER_TESTS_CHROMIUM_BROWSER || 'ChromeHeadless',
flags: ['--allow-insecure-localhost'],
displayName: 'Chrome w/o security',
},
FirefoxHeadlessInsecure: {
base: 'FirefoxHeadless',
prefs: {
acceptInsecureCerts: true,
},
},
},
});
};
1 change: 0 additions & 1 deletion packages/platform-test-suite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"homepage": "https://github.com/dashevo/platform-test-suite#readme",
"dependencies": {
"@chiragrupani/karma-chromium-edge-launcher": "^2.3.1",
"@dashevo/dapi-client": "workspace:*",
"@dashevo/dashcore-lib": "~0.21.0",
"@dashevo/dpns-contract": "workspace:*",
Expand Down
16 changes: 11 additions & 5 deletions packages/wallet-lib/karma/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const karmaMocha = require('karma-mocha');
const karmaMochaReporter = require('karma-mocha-reporter');
const karmaChai = require('karma-chai');
const karmaChromeLauncher = require('karma-chrome-launcher');
const karmaChromiumEdgeLauncher = require('@chiragrupani/karma-chromium-edge-launcher');
const karmaFirefoxLauncher = require('karma-firefox-launcher');
const karmaSourcemapLoader = require('karma-sourcemap-loader');
const karmaWebpack = require('karma-webpack');

Expand Down Expand Up @@ -43,7 +43,7 @@ module.exports = {
port: 9876,
colors: true,
autoWatch: false,
browsers: ['chromeWithoutSecurity'],
browsers: [process.env.BROWSER_TESTS_INSECURE_BROWSER || 'chromeWithoutSecurity'],
singleRun: false,
concurrency: Infinity,
browserNoActivityTimeout: 10 * 60 * 1000,
Expand All @@ -52,15 +52,21 @@ module.exports = {
karmaMochaReporter,
karmaChai,
karmaChromeLauncher,
karmaChromiumEdgeLauncher,
karmaFirefoxLauncher,
karmaSourcemapLoader,
karmaWebpack,
],
customLaunchers: {
chromeWithoutSecurity: {
base: process.env.CHROMIUM_BASED_BROWSER_NAME || 'ChromeHeadless',
ChromeHeadlessInsecure: {
base: process.env.BROWSER_TESTS_CHROMIUM_BROWSER || 'ChromeHeadless',
flags: ['--allow-insecure-localhost'],
displayName: 'Chrome w/o security',
},
FirefoxHeadlessInsecure: {
base: 'FirefoxHeadless',
prefs: {
acceptInsecureCerts: true,
},
},
},
};
2 changes: 1 addition & 1 deletion packages/wallet-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@chiragrupani/karma-chromium-edge-launcher": "^2.3.1",
"@dashevo/dash-spv": "workspace:*",
"assert": "^2.0.0",
"browserify-zlib": "^0.2.0",
Expand All @@ -76,6 +75,7 @@
"karma": "^6.4.1",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^2.1.2",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.7",
Expand Down
4 changes: 1 addition & 3 deletions packages/wasm-dpp/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const karmaMocha = require('karma-mocha');
const karmaMochaReporter = require('karma-mocha-reporter');
const karmaChai = require('karma-chai');
const karmaChromeLauncher = require('karma-chrome-launcher');
const karmaChromiumEdgeLauncher = require('@chiragrupani/karma-chromium-edge-launcher');
const karmaFirefoxLauncher = require('karma-firefox-launcher');
const karmaWebpack = require('karma-webpack');

Expand Down Expand Up @@ -61,7 +60,7 @@ module.exports = (config) => {
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: [
process.env.CHROMIUM_BASED_BROWSER_NAME || 'ChromeHeadless',
process.env.BROWSER_TESTS_CHROMIUM_BROWSER || 'ChromeHeadless',
'FirefoxHeadless',
],
singleRun: false,
Expand All @@ -72,7 +71,6 @@ module.exports = (config) => {
karmaChai,
karmaChromeLauncher,
karmaFirefoxLauncher,
karmaChromiumEdgeLauncher,
karmaWebpack,
],
});
Expand Down
1 change: 0 additions & 1 deletion packages/wasm-dpp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@babel/cli": "^7.21.0",
"@babel/core": "^7.15.5",
"@babel/preset-env": "^7.15.4",
"@chiragrupani/karma-chromium-edge-launcher": "^2.3.1",
"@dashevo/dashcore-lib": "~0.21.0",
"@dashevo/dpns-contract": "workspace:*",
"@types/bs58": "^4.0.1",
Expand Down
Loading

0 comments on commit 53315d9

Please sign in to comment.