2023-01-05 16:09:42 +01:00
|
|
|
# DO NOT EDIT, generated with cmd/gh-action-integration-generator/main.go
|
|
|
|
# To regenerate, run "go generate" in cmd/gh-action-integration-generator/
|
|
|
|
|
|
|
|
name: Integration Test v2 - TestPingAllByHostname
|
|
|
|
|
|
|
|
on: [pull_request]
|
|
|
|
|
2023-01-30 10:20:08 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-01-05 16:09:42 +01:00
|
|
|
jobs:
|
2023-08-29 08:33:33 +02:00
|
|
|
TestPingAllByHostname:
|
2023-01-05 16:09:42 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
|
|
|
|
2023-06-28 11:56:35 +01:00
|
|
|
- uses: DeterminateSystems/nix-installer-action@main
|
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
|
|
- uses: satackey/action-docker-layer-caching@main
|
|
|
|
continue-on-error: true
|
|
|
|
|
2023-01-05 16:09:42 +01:00
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
|
|
|
uses: tj-actions/changed-files@v34
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
*.nix
|
|
|
|
go.*
|
|
|
|
**/*.go
|
|
|
|
integration_test/
|
|
|
|
config-example.yaml
|
|
|
|
|
2023-08-29 08:33:33 +02:00
|
|
|
- name: Run TestPingAllByHostname
|
2023-11-27 18:32:52 +01:00
|
|
|
uses: Wandalen/wretry.action@master
|
2023-01-05 16:09:42 +01:00
|
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
2023-11-27 18:32:52 +01:00
|
|
|
with:
|
|
|
|
attempt_limit: 5
|
|
|
|
command: |
|
2023-01-05 16:09:42 +01:00
|
|
|
nix develop --command -- docker run \
|
|
|
|
--tty --rm \
|
|
|
|
--volume ~/.cache/hs-integration-go:/go \
|
|
|
|
--name headscale-test-suite \
|
|
|
|
--volume $PWD:$PWD -w $PWD/integration \
|
|
|
|
--volume /var/run/docker.sock:/var/run/docker.sock \
|
2023-01-30 10:20:08 +01:00
|
|
|
--volume $PWD/control_logs:/tmp/control \
|
2024-02-18 19:31:29 +01:00
|
|
|
--env HEADSCALE_INTEGRATION_POSTGRES=0 \
|
2023-01-05 16:09:42 +01:00
|
|
|
golang:1 \
|
2023-05-10 12:10:33 +02:00
|
|
|
go run gotest.tools/gotestsum@latest -- ./... \
|
2023-01-05 16:09:42 +01:00
|
|
|
-failfast \
|
|
|
|
-timeout 120m \
|
|
|
|
-parallel 1 \
|
2023-01-06 15:40:03 +01:00
|
|
|
-run "^TestPingAllByHostname$"
|
2023-01-30 10:20:08 +01:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
if: always() && steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
with:
|
|
|
|
name: logs
|
|
|
|
path: "control_logs/*.log"
|
2023-04-27 16:57:11 +02:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
if: always() && steps.changed-files.outputs.any_changed == 'true'
|
|
|
|
with:
|
|
|
|
name: pprof
|
|
|
|
path: "control_logs/*.pprof.tar"
|