diff --git a/.github/workflows/build-and-test-docker.yml b/.github/workflows/build-and-test-docker.yml index accfc1a..89a9309 100644 --- a/.github/workflows/build-and-test-docker.yml +++ b/.github/workflows/build-and-test-docker.yml @@ -9,7 +9,7 @@ on: - main jobs: - build-and-test: + build-docker-and-test: name: Build curl-impersonate Docker images and run the tests runs-on: ubuntu-latest services: diff --git a/.github/workflows/build-and-test-make.yml b/.github/workflows/build-and-test-make.yml index 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.04 capture_interface: eth0 + make: make - os: macos-11 capture_interface: en0 + make: gmake steps: + - uses: actions/setup-python@v3 + - name: Install Ubuntu dependencies if: 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 dependencies sudo 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 tests brew install tcpdump nghttp2 nss + - name: Install common dependencies + run: | + # Firefox version dependencies + pip3 install gyp-next + - name: Check out the repo uses: actions/checkout@v2 - name: Install dependencies for the tests script run: | - # 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 script run: | @@ -65,15 +68,15 @@ jobs: - name: Build the Chrome version of curl-impersonate run: | - 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-impersonate run: | - make firefox-build - make firefox-checkbuild - make firefox-install + ${{ matrix.make }} firefox-build + ${{ matrix.make }} firefox-checkbuild + ${{ matrix.make }} firefox-install - name: Prepare the tests run: | @@ -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 }}