mirror of
https://github.com/bettercap/bettercap.git
synced 2025-03-12 04:36:03 -07:00
chore: refactored github workflows into separate files
This commit is contained in:
parent
6f1920f478
commit
9ab2e13f31
@ -1,20 +1,21 @@
|
||||
name: Test
|
||||
name: Test on Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
go-version: ['1.22.x']
|
||||
|
||||
steps:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
go-version: ['1.22.x']
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@ -24,13 +25,9 @@ jobs:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Install Dependencies
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
run: sudo apt-get update && sudo apt-get install -y p7zip-full libpcap-dev libnetfilter-queue-dev libusb-1.0-0-dev
|
||||
|
||||
- name: Install Dependencies (macOS)
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
run: brew install libpcap libusb p7zip
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
env GO111MODULE=on make test
|
||||
env GO111MODULE=on make test
|
||||
|
33
.github/workflows/test-on-macos.yml
vendored
Normal file
33
.github/workflows/test-on-macos.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: Test on macOS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest]
|
||||
go-version: ['1.22.x']
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Install Dependencies
|
||||
run: brew install libpcap libusb p7zip
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
env GO111MODULE=on make test
|
||||
|
44
.github/workflows/test-on-windows.yml
vendored
Normal file
44
.github/workflows/test-on-windows.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
name: Test on Windows
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest]
|
||||
go-version: ['1.22.x']
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
choco install openssl.light -y
|
||||
choco install make -y
|
||||
choco install 7zip -y
|
||||
choco install pkgconfiglite -y
|
||||
mkdir C:\pkg-config
|
||||
choco install zadig -y
|
||||
curl -L "https://github.com/libusb/libusb/releases/download/v1.0.24/libusb-1.0.24.7z" -o "C:\libusb.7z"
|
||||
7z x -y "C:\libusb.7z" -o"C:\libusb"
|
||||
curl -L "https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip" -o "C:\wpcap-sdk.zip"
|
||||
7z x -y "C:\wpcap-sdk.zip" -o"C:\winpcap"
|
||||
copy builder\libusb.pc C:\pkg-config\libusb.pc
|
||||
copy builder\libusb.pc C:\pkg-config\libusb-1.0.pc
|
||||
|
||||
- name: Run Tests
|
||||
run: env GO111MODULE=on make test
|
||||
|
Loading…
x
Reference in New Issue
Block a user