зеркало из https://github.com/openwpm/OpenWPM.git
Merge branch 'master' into dns_instrument_fix
This commit is contained in:
Коммит
8a855a4f52
|
@ -7,7 +7,6 @@ on:
|
|||
- "v*.*.*"
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
jobs:
|
||||
build_and_publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -26,30 +25,30 @@ jobs:
|
|||
if [[ $GITHUB_REF == refs/heads/master ]]; then
|
||||
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
|
||||
fi
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo tags="${TAGS}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- name: Log into Dockerhub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER_NAME }}
|
||||
password: ${{ secrets.DOCKERHUB_USER_PASSWORD }}
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v3
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
push: true
|
||||
|
|
|
@ -13,12 +13,12 @@ name: "CodeQL"
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '33 19 * * 6'
|
||||
- cron: "33 19 * * 6"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
|
@ -32,39 +32,39 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript', 'python' ]
|
||||
language: ["javascript", "python"]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
|
|
@ -14,14 +14,14 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# All of these steps are just setup
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setting MAMBA_PATH
|
||||
run: echo "MAMBA_PATH=$HOME/mamba" >> $GITHUB_ENV
|
||||
- name: Setting OPENWPM_MAMBA_PATH
|
||||
run: echo "OPENWPM_MAMBA_PATH=$MAMBA_PATH/envs/openwpm" >> $GITHUB_ENV
|
||||
# If the environment.yaml hasn't changed we just reuse the entire conda install
|
||||
- id: cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: conda-cache
|
||||
with:
|
||||
|
@ -49,14 +49,14 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# All of these steps are just setup
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setting MAMBA_PATH
|
||||
run: echo "MAMBA_PATH=$HOME/mamba" >> $GITHUB_ENV
|
||||
- name: Setting OPENWPM_MAMBA_PATH
|
||||
run: echo "OPENWPM_MAMBA_PATH=$MAMBA_PATH/envs/openwpm" >> $GITHUB_ENV
|
||||
# If the environment.yaml hasn't changed we just reuse the entire conda install
|
||||
- id: cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: conda-cache
|
||||
with:
|
||||
|
@ -96,9 +96,9 @@ jobs:
|
|||
fail-fast: false
|
||||
steps:
|
||||
# All of these steps are just setup, maybe we should wrap them in an action
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
|
@ -113,7 +113,7 @@ jobs:
|
|||
|
||||
# If the environment.yaml hasn't changed we just reuse the entire conda install
|
||||
- id: conda-cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: conda-cache
|
||||
with:
|
||||
|
|
Двоичные данные
test/profile.tar.gz
Двоичные данные
test/profile.tar.gz
Двоичный файл не отображается.
|
@ -1,3 +1,4 @@
|
|||
import logging
|
||||
import tarfile
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
@ -13,6 +14,7 @@ from openwpm.config import BrowserParamsInternal
|
|||
from openwpm.errors import CommandExecutionError, ProfileLoadError
|
||||
from openwpm.utilities import db_utils
|
||||
|
||||
from . import openwpmtest
|
||||
from .utilities import BASE_TEST_URL
|
||||
|
||||
# TODO update these tests to make use of blocking commands
|
||||
|
@ -117,17 +119,16 @@ def test_seed_persistence(default_params, task_manager_creator):
|
|||
for browser_param in browser_params:
|
||||
browser_param.seed_tar = p
|
||||
manager, db = task_manager_creator(default_params)
|
||||
with manager:
|
||||
command_sequences = []
|
||||
for _ in range(openwpmtest.NUM_BROWSERS):
|
||||
cs = CommandSequence(url=BASE_TEST_URL)
|
||||
cs.get()
|
||||
cs.append_command(AssertConfigSetCommand("test_pref", True))
|
||||
command_sequences.append(cs)
|
||||
|
||||
command_sequences = []
|
||||
for _ in range(2):
|
||||
cs = CommandSequence(url=BASE_TEST_URL)
|
||||
cs.get()
|
||||
cs.append_command(AssertConfigSetCommand("test_pref", True))
|
||||
command_sequences.append(cs)
|
||||
|
||||
for cs in command_sequences:
|
||||
manager.execute_command_sequence(cs)
|
||||
manager.close()
|
||||
for cs in command_sequences:
|
||||
manager.execute_command_sequence(cs)
|
||||
query_result = db_utils.query_db(
|
||||
db,
|
||||
"SELECT * FROM crawl_history;",
|
||||
|
@ -141,6 +142,7 @@ class AssertConfigSetCommand(BaseCommand):
|
|||
def __init__(self, pref_name: str, expected_value: Any) -> None:
|
||||
self.pref_name = pref_name
|
||||
self.expected_value = expected_value
|
||||
self.logger = logging.getLogger("openwpm")
|
||||
|
||||
def execute(
|
||||
self,
|
||||
|
@ -162,6 +164,7 @@ class AssertConfigSetCommand(BaseCommand):
|
|||
}}
|
||||
"""
|
||||
)
|
||||
self.logger.error(f"Got result: {result}")
|
||||
assert result == self.expected_value
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче