mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2025-08-10 10:49:26 +00:00
Fix various issues with automatic tests on macOS
This commit is contained in:
2
.github/workflows/build-and-test-docker.yml
vendored
2
.github/workflows/build-and-test-docker.yml
vendored
@@ -9,7 +9,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-docker-and-test:
|
||||||
name: Build curl-impersonate Docker images and run the tests
|
name: Build curl-impersonate Docker images and run the tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
|
32
.github/workflows/build-and-test-make.yml
vendored
32
.github/workflows/build-and-test-make.yml
vendored
@@ -18,16 +18,17 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
capture_interface: eth0
|
capture_interface: eth0
|
||||||
|
make: make
|
||||||
- os: macos-11
|
- os: macos-11
|
||||||
capture_interface: en0
|
capture_interface: en0
|
||||||
|
make: gmake
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/setup-python@v3
|
||||||
|
|
||||||
- name: Install Ubuntu dependencies
|
- name: Install Ubuntu dependencies
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
if: matrix.os == 'ubuntu-20.04'
|
||||||
run: |
|
run: |
|
||||||
sudo apt install build-essential pkg-config cmake ninja-build curl autoconf automake libtool
|
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 dependencies
|
# Chrome version dependencies
|
||||||
sudo apt install golang-go
|
sudo apt install golang-go
|
||||||
# Needed to compile 'minicurl'
|
# Needed to compile 'minicurl'
|
||||||
@@ -39,8 +40,6 @@ jobs:
|
|||||||
if: matrix.os == 'macos-11'
|
if: matrix.os == 'macos-11'
|
||||||
run: |
|
run: |
|
||||||
brew install pkg-config make cmake ninja autoconf automake libtool
|
brew install pkg-config make cmake ninja autoconf automake libtool
|
||||||
# Firefox version dependencies
|
|
||||||
pip3 install gyp-next
|
|
||||||
# Chrome version dependencies
|
# Chrome version dependencies
|
||||||
# (Go is already installed)
|
# (Go is already installed)
|
||||||
# brew install go
|
# brew install go
|
||||||
@@ -49,13 +48,17 @@ jobs:
|
|||||||
# More dependencies for the tests
|
# More dependencies for the tests
|
||||||
brew install tcpdump nghttp2 nss
|
brew install tcpdump nghttp2 nss
|
||||||
|
|
||||||
|
- name: Install common dependencies
|
||||||
|
run: |
|
||||||
|
# Firefox version dependencies
|
||||||
|
pip3 install gyp-next
|
||||||
|
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install dependencies for the tests script
|
- name: Install dependencies for the tests script
|
||||||
run: |
|
run: |
|
||||||
# Install globally so that we can run 'pytest' with 'sudo'
|
pip3 install -r tests/requirements.txt
|
||||||
sudo pip install -r tests/requirements.txt
|
|
||||||
|
|
||||||
- name: Run configure script
|
- name: Run configure script
|
||||||
run: |
|
run: |
|
||||||
@@ -65,15 +68,15 @@ jobs:
|
|||||||
|
|
||||||
- name: Build the Chrome version of curl-impersonate
|
- name: Build the Chrome version of curl-impersonate
|
||||||
run: |
|
run: |
|
||||||
make chrome-build
|
${{ matrix.make }} chrome-build
|
||||||
make chrome-checkbuild
|
${{ matrix.make }} chrome-checkbuild
|
||||||
make chrome-install
|
${{ matrix.make }} chrome-install
|
||||||
|
|
||||||
- name: Build the Firefox version of curl-impersonate
|
- name: Build the Firefox version of curl-impersonate
|
||||||
run: |
|
run: |
|
||||||
make firefox-build
|
${{ matrix.make }} firefox-build
|
||||||
make firefox-checkbuild
|
${{ matrix.make }} firefox-checkbuild
|
||||||
make firefox-install
|
${{ matrix.make }} firefox-install
|
||||||
|
|
||||||
- name: Prepare the tests
|
- name: Prepare the tests
|
||||||
run: |
|
run: |
|
||||||
@@ -84,4 +87,5 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd tests
|
cd tests
|
||||||
# sudo is needed for capturing packets
|
# 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 }}
|
||||||
|
Reference in New Issue
Block a user