Skip to content

Test

Test #10

Workflow file for this run

name: Test
on:
push:
pull_request:
schedule:
# Weekly, at 5:45 AM on Friday (somewhat randomly chosen).
- cron: '45 5 * * 5'
workflow_dispatch:
jobs:
test:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-latest]
runs-on: '${{ matrix.os }}'
name: 'Test: ${{ matrix.os }}'
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
- name: Set up WireGuard Server
run: ./tests/wg-server.sh CREATE
# Magic following values comes from the ./tests/wg-server.sh script
- name: Set up WireGuard
uses: ./
with:
endpoint: '10.1.1.1:51820'
endpoint_public_key: 'gHF6vSiGLl/qbZQDSb6kC65RxQq5bEIGDJIuyWxxgy0='
ips: '10.10.1.2'
allowed_ips: '10.10.1.0/24,10.2.1.0/24'
private_key: 'IKgP085Cw91kP73B/76dRUxjJ6Rrz8azfavtj9SDzHA='
preshared_key: 'G0gmiQgbUDUR92M2WwsHgt3LCIjCzhsS16xwHBbN2MM='
keepalive: 25
- name: Check endpoint
run: ping -W 10 -c 5 -- '10.2.1.2'