| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- name: Test
- on:
- push:
- pull_request:
- jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - name: Set up Go
- uses: actions/setup-go@v5
- with:
- go-version: 1.25
-
- - name: Build
- run:
- go build
-
- - name: Generate edgevpnconfig
- run: |
- ./edgevpn -g > config.yaml
- - name: Upload results
- uses: actions/upload-artifact@v4
- with:
- name: connection
- path: config.yaml
- if-no-files-found: error
- - name: Upload results
- uses: actions/upload-artifact@v4
- with:
- name: edgevpn
- path: edgevpn
- if-no-files-found: error
-
- test-suite:
- runs-on: ubuntu-latest
- needs: build
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - name: Set up Go
- uses: actions/setup-go@v5
- with:
- go-version: 1.25
- - name: Download result for build
- uses: actions/download-artifact@v5
- with:
- name: connection
- path: ./
- - name: Download result for build
- uses: actions/download-artifact@v5
- with:
- name: edgevpn
- path: ./
- - name: Test suite
- run: |
- sudo sysctl -w net.core.rmem_max=2500000
- chmod +x edgevpn
- EDGEVPNCONFIG=config.yaml ./.github/tests.sh
- - name: Codecov
- uses: codecov/[email protected]
- with:
- file: coverage.txt
-
- vpntest:
- runs-on: ubuntu-latest
- needs: build
- strategy:
- matrix:
- include:
- - ip: "10.1.0.13/24"
- target_ip: "10.1.0.11"
- role: "download"
- - ip: "10.1.0.11/24"
- target_ip: "10.1.0.13"
- role: ""
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - name: Download result for build
- uses: actions/download-artifact@v5
- with:
- name: connection
- path: ./
- - name: Download result for build
- uses: actions/download-artifact@v5
- with:
- name: edgevpn
- path: ./
- - name: Ping test
- run: |
- # Start caddy server to share file across nodes
- docker run -d -p 80:80 \
- -v $PWD/:/usr/share/caddy/ \
- -v caddy_data:/data \
- caddy
- chmod +x edgevpn
- sudo sysctl -w net.core.rmem_max=2500000
- sudo EDGEVPNCONFIG=config.yaml IFACE=edgevpn0 ADDRESS=${{ matrix.ip }} ./edgevpn --api --log-level debug &
- bash ./.github/vpntest.sh ${{ matrix.target_ip }} ${{ matrix.ip }} ${{ matrix.role }}
- servicestest:
- runs-on: ubuntu-latest
- needs: build
- strategy:
- matrix:
- include:
- - role: "expose"
- - role: "connect"
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - name: Download result for build
- uses: actions/download-artifact@v5
- with:
- name: connection
- path: ./
- - name: Download result for build
- uses: actions/download-artifact@v5
- with:
- name: edgevpn
- path: ./
- - name: Services test
- run: |
- chmod +x edgevpn
- export EDGEVPNCONFIG=config.yaml
- sudo sysctl -w net.core.rmem_max=2500000
- bash ./.github/servicestest.sh ${{ matrix.role }}
- filestest:
- runs-on: ubuntu-latest
- needs: build
- strategy:
- matrix:
- include:
- - role: "sender"
- - role: "receiver"
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - name: Download result for build
- uses: actions/download-artifact@v5
- with:
- name: connection
- path: ./
- - name: Download result for build
- uses: actions/download-artifact@v5
- with:
- name: edgevpn
- path: ./
- - name: File test
- run: |
- chmod +x edgevpn
- export EDGEVPNCONFIG=config.yaml
- sudo sysctl -w net.core.rmem_max=2500000
- bash ./.github/filetest.sh ${{ matrix.role }}
|