aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/test.yml
blob: 4c6fe16f1c4591847e6ddb2704d0b17e206170e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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-18.04, ubuntu-20.04, ubuntu-latest]
    runs-on: '${{ matrix.os }}'
    name: 'Test: ${{ matrix.os }}'
    defaults:
      run:
        shell: bash
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up WireGuard
        uses: ./
        with:
          endpoint: '${{ secrets.ENDPOINT }}'
          endpoint_public_key: '${{ secrets.ENDPOINT_PUBLIC }}'
          ips: '${{ secrets.IPS }}'
          allowed_ips: '${{ secrets.ALLOWED_IPS }}'
          private_key: '${{ secrets.PRIVATE }}'
          preshared_key: '${{ secrets.PRESHARED }}'
      - name: Check endpoint
        run: ping -W 10 -c 5 -- '${{ secrets.ENDPOINT_PRIVATE_IP }}'