Skip to content

CI

CI #9969

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- 'main'
jobs:
test-linux:
strategy:
max-parallel: 4
matrix:
runs-on: [ubuntu-latest, ubuntu-24.04, ubuntu-22.04, ubuntu-24.04-arm, ubuntu-22.04-arm]
include:
- runs-on: ubuntu-latest
service-key: SERVICE_KEY
- runs-on: ubuntu-24.04
service-key: SERVICE_KEY1
- runs-on: ubuntu-22.04
service-key: SERVICE_KEY2
- runs-on: ubuntu-24.04-arm
service-key: SERVICE_KEY_ARM1
- runs-on: ubuntu-22.04-arm
service-key: SERVICE_KEY_ARM2
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./
with:
service-key: ${{ secrets[matrix.service-key] }}
- name: Twingate logs
run: journalctl -u twingate
- name: Twingate status
run: twingate status
- name: Nslookup a secure resource
env:
TEST_URL: business.prod.beamreachinc.int
run: |
nslookup $TEST_URL
- run: cat /run/systemd/resolve/resolv.conf
- run: resolvectl status
- name: Access a secure resource
env:
TEST_URL: http://business.prod.beamreachinc.int/
run: |
echo Calling $TEST_URL 🚀
curl -v $TEST_URL
- name: Access a secure resource from a docker
run: |
docker run --rm --network host alpine:3.21 /bin/sh -c '
sed "/^nameserver 168.63.129.16$/d; /^search/d" /etc/resolv.conf > /tmp/resolv.conf &&
cat /tmp/resolv.conf > /etc/resolv.conf &&
cat /etc/resolv.conf &&
apk add --no-cache curl &&
curl -v http://business.prod.beamreachinc.int/
'
- name: Print client logs
if: always()
run: journalctl -u twingate
- run: echo "SUCCESS!!! 🤩 This job's status is ${{ job.status }}."
test-linux-docker:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
options: --privileged
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./
with:
service-key: ${{ secrets.SERVICE_KEY }}
- name: Verify Twingate status
run: twingate status
- name: Access a secure resource
env:
TEST_URL: http://business.prod.beamreachinc.int/
run: |
curl -v $TEST_URL
- name: Print client logs
if: always()
run: |
if command -v journalctl >/dev/null 2>&1; then
journalctl -u twingate
elif [ -f /var/log/twingated.log ]; then
cat /var/log/twingated.log
else
echo "No Twingate logs found"
fi
test-windows:
strategy:
max-parallel: 4
matrix:
runs-on: [windows-latest, windows-2025, windows-2022]
include:
- runs-on: windows-latest
service-key: SERVICE_KEY_WIN1
- runs-on: windows-2025
service-key: SERVICE_KEY_WIN2
- runs-on: windows-2022
service-key: SERVICE_KEY_WIN3
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 6
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./
with:
service-key: ${{ secrets[matrix.service-key] }}
- name: Access a secure resource
shell: powershell
env:
TEST_URL: http://business.prod.beamreachinc.int/
run: |
Write-Host "Calling $env:TEST_URL 🚀"
Invoke-WebRequest -Uri $env:TEST_URL -Verbose -TimeoutSec 10 -UseBasicParsing
- name: Print client logs
shell: powershell
if: always()
run: Get-Content "$env:PROGRAMDATA\Twingate\logs\twingate.service.log"
- name: Print installer log
shell: powershell
if: always()
run: Get-Content "install.log"
- shell: powershell
run: Write-Host "SUCCESS!!! 🤩 This job's status is ${{ job.status }}."