curl-impersonate: A special build of curl that can impersonate Chrome & Firefox
Fix various issues with automatic tests on macOS
lwthiker90012e78de35
diff --git a/.github/workflows/build-and-test-docker.yml b/.github/workflows/build-and-test-docker.ymlindex accfc1a..89a9309 100644--- a/.github/workflows/build-and-test-docker.yml+++ b/.github/workflows/build-and-test-docker.yml@@ -9,7 +9,7 @@ on:- mainjobs:- build-and-test:+ build-docker-and-test:name: Build curl-impersonate Docker images and run the testsruns-on: ubuntu-latestservices:diff --git a/.github/workflows/build-and-test-make.yml b/.github/workflows/build-and-test-make.ymlindex ca1723b..deaddfe 100644--- a/.github/workflows/build-and-test-make.yml+++ b/.github/workflows/build-and-test-make.yml@@ -18,16 +18,17 @@ jobs:include:- os: ubuntu-20.04capture_interface: eth0+ make: make- os: macos-11capture_interface: en0+ make: gmakesteps:+ - uses: actions/setup-python@v3+- name: Install Ubuntu dependenciesif: matrix.os == 'ubuntu-20.04'run: |sudo apt install build-essential pkg-config cmake ninja-build curl autoconf automake libtool- # Firefox version dependencies- sudo apt install python3-pip python-is-python3- pip install gyp-next# Chrome version dependenciessudo apt install golang-go# Needed to compile 'minicurl'@@ -39,8 +40,6 @@ jobs:if: matrix.os == 'macos-11'run: |brew install pkg-config make cmake ninja autoconf automake libtool- # Firefox version dependencies- pip3 install gyp-next# Chrome version dependencies# (Go is already installed)# brew install go@@ -49,13 +48,17 @@ jobs:# More dependencies for the testsbrew install tcpdump nghttp2 nss+ - name: Install common dependencies+ run: |+ # Firefox version dependencies+ pip3 install gyp-next+- name: Check out the repouses: actions/checkout@v2- name: Install dependencies for the tests scriptrun: |- # Install globally so that we can run 'pytest' with 'sudo'- sudo pip install -r tests/requirements.txt+ pip3 install -r tests/requirements.txt- name: Run configure scriptrun: |@@ -65,15 +68,15 @@ jobs:- name: Build the Chrome version of curl-impersonaterun: |- make chrome-build- make chrome-checkbuild- make chrome-install+ ${{ matrix.make }} chrome-build+ ${{ matrix.make }} chrome-checkbuild+ ${{ matrix.make }} chrome-install- name: Build the Firefox version of curl-impersonaterun: |- make firefox-build- make firefox-checkbuild- make firefox-install+ ${{ matrix.make }} firefox-build+ ${{ matrix.make }} firefox-checkbuild+ ${{ matrix.make }} firefox-install- name: Prepare the testsrun: |@@ -84,4 +87,5 @@ jobs:run: |cd tests# sudo is needed for capturing packets- sudo pytest . --log-cli-level DEBUG --install-dir ${{ runner.temp}}/install --capture-interface ${{ matrix.capture_interface }}+ python_bin=$(which python3)+ sudo $python_bin -m pytest . --log-cli-level DEBUG --install-dir ${{ runner.temp}}/install --capture-interface ${{ matrix.capture_interface }}