From e15a08326c111be9d48fca064b13b25ce0d41b1e Mon Sep 17 00:00:00 2001 From: Vitalij Dovhanyc <45185420+vdovhanych@users.noreply.github.com> Date: Sat, 2 Mar 2024 22:36:38 +0100 Subject: [PATCH] simplify integration testing with matrix jobs (#1799) * simplify integration testing with matrix jobs * check if all of the integration tests are in the test-integration workflow --- .github/workflows/check-tests.yaml | 41 +++++ ...ation-v2-TestACLAllowStarDst-postgres.yaml | 68 ------- ...st-integration-v2-TestACLAllowStarDst.yaml | 68 ------- ...ion-v2-TestACLAllowUser80Dst-postgres.yaml | 68 ------- ...-integration-v2-TestACLAllowUser80Dst.yaml | 68 ------- ...ation-v2-TestACLAllowUserDst-postgres.yaml | 68 ------- ...st-integration-v2-TestACLAllowUserDst.yaml | 68 ------- ...tion-v2-TestACLDenyAllPort80-postgres.yaml | 68 ------- ...t-integration-v2-TestACLDenyAllPort80.yaml | 68 ------- ...stACLDevice1CanAccessDevice2-postgres.yaml | 68 ------- ...ion-v2-TestACLDevice1CanAccessDevice2.yaml | 68 ------- ...v2-TestACLHostsInNetMapTable-postgres.yaml | 68 ------- ...egration-v2-TestACLHostsInNetMapTable.yaml | 68 ------- ...v2-TestACLNamedHostsCanReach-postgres.yaml | 68 ------- ...egration-v2-TestACLNamedHostsCanReach.yaml | 68 ------- ...CLNamedHostsCanReachBySubnet-postgres.yaml | 68 ------- ...-v2-TestACLNamedHostsCanReachBySubnet.yaml | 68 ------- ...gration-v2-TestApiKeyCommand-postgres.yaml | 68 ------- ...test-integration-v2-TestApiKeyCommand.yaml | 68 ------- ...-TestAuthKeyLogoutAndRelogin-postgres.yaml | 68 ------- ...ration-v2-TestAuthKeyLogoutAndRelogin.yaml | 68 ------- ...WebFlowAuthenticationPingAll-postgres.yaml | 68 ------- ...-TestAuthWebFlowAuthenticationPingAll.yaml | 68 ------- ...tAuthWebFlowLogoutAndRelogin-postgres.yaml | 68 ------- ...on-v2-TestAuthWebFlowLogoutAndRelogin.yaml | 68 ------- ...ation-v2-TestCreateTailscale-postgres.yaml | 68 ------- ...st-integration-v2-TestCreateTailscale.yaml | 68 ------- ...on-v2-TestDERPServerScenario-postgres.yaml | 68 ------- ...integration-v2-TestDERPServerScenario.yaml | 68 ------- ...ableDisableAutoApprovedRoute-postgres.yaml | 68 ------- ...v2-TestEnableDisableAutoApprovedRoute.yaml | 68 ------- ...ration-v2-TestEnablingRoutes-postgres.yaml | 68 ------- ...est-integration-v2-TestEnablingRoutes.yaml | 68 ------- ...integration-v2-TestEphemeral-postgres.yaml | 68 ------- .../test-integration-v2-TestEphemeral.yaml | 68 ------- ...ntegration-v2-TestExpireNode-postgres.yaml | 68 ------- .../test-integration-v2-TestExpireNode.yaml | 68 ------- ...2-TestHASubnetRouterFailover-postgres.yaml | 68 ------- ...gration-v2-TestHASubnetRouterFailover.yaml | 68 ------- ...integration-v2-TestHeadscale-postgres.yaml | 68 ------- .../test-integration-v2-TestHeadscale.yaml | 68 ------- ...NodeAdvertiseTagNoACLCommand-postgres.yaml | 68 ------- ...n-v2-TestNodeAdvertiseTagNoACLCommand.yaml | 68 ------- ...deAdvertiseTagWithACLCommand-postgres.yaml | 68 ------- ...v2-TestNodeAdvertiseTagWithACLCommand.yaml | 68 ------- ...tegration-v2-TestNodeCommand-postgres.yaml | 68 ------- .../test-integration-v2-TestNodeCommand.yaml | 68 ------- ...ion-v2-TestNodeExpireCommand-postgres.yaml | 68 ------- ...-integration-v2-TestNodeExpireCommand.yaml | 68 ------- ...ation-v2-TestNodeMoveCommand-postgres.yaml | 68 ------- ...st-integration-v2-TestNodeMoveCommand.yaml | 68 ------- ...TestNodeOnlineLastSeenStatus-postgres.yaml | 68 ------- ...ation-v2-TestNodeOnlineLastSeenStatus.yaml | 68 ------- ...ion-v2-TestNodeRenameCommand-postgres.yaml | 68 ------- ...-integration-v2-TestNodeRenameCommand.yaml | 68 ------- ...ration-v2-TestNodeTagCommand-postgres.yaml | 68 ------- ...est-integration-v2-TestNodeTagCommand.yaml | 68 ------- ...estOIDCAuthenticationPingAll-postgres.yaml | 68 ------- ...tion-v2-TestOIDCAuthenticationPingAll.yaml | 68 ------- ...xpireNodesBasedOnTokenExpiry-postgres.yaml | 68 ------- ...TestOIDCExpireNodesBasedOnTokenExpiry.yaml | 68 ------- ...ion-v2-TestPingAllByHostname-postgres.yaml | 68 ------- ...-integration-v2-TestPingAllByHostname.yaml | 68 ------- ...tegration-v2-TestPingAllByIP-postgres.yaml | 68 ------- .../test-integration-v2-TestPingAllByIP.yaml | 68 ------- ...v2-TestPingAllByIPPublicDERP-postgres.yaml | 68 ------- ...egration-v2-TestPingAllByIPPublicDERP.yaml | 68 ------- ...ion-v2-TestPreAuthKeyCommand-postgres.yaml | 68 ------- ...-integration-v2-TestPreAuthKeyCommand.yaml | 68 ------- ...hKeyCommandReusableEphemeral-postgres.yaml | 68 ------- ...estPreAuthKeyCommandReusableEphemeral.yaml | 68 ------- ...eAuthKeyCommandWithoutExpiry-postgres.yaml | 68 ------- ...v2-TestPreAuthKeyCommandWithoutExpiry.yaml | 68 ------- ...ation-v2-TestResolveMagicDNS-postgres.yaml | 68 ------- ...st-integration-v2-TestResolveMagicDNS.yaml | 68 ------- ...ion-v2-TestSSHIsBlockedInACL-postgres.yaml | 68 ------- ...-integration-v2-TestSSHIsBlockedInACL.yaml | 68 ------- ...TestSSHMultipleUsersAllToAll-postgres.yaml | 68 ------- ...ation-v2-TestSSHMultipleUsersAllToAll.yaml | 68 ------- ...on-v2-TestSSHNoSSHConfigured-postgres.yaml | 68 ------- ...integration-v2-TestSSHNoSSHConfigured.yaml | 68 ------- ...ation-v2-TestSSHOneUserToAll-postgres.yaml | 68 ------- ...st-integration-v2-TestSSHOneUserToAll.yaml | 68 ------- ...-v2-TestSSHUserOnlyIsolation-postgres.yaml | 68 ------- ...tegration-v2-TestSSHUserOnlyIsolation.yaml | 68 ------- ...ration-v2-TestSubnetRouteACL-postgres.yaml | 68 ------- ...est-integration-v2-TestSubnetRouteACL.yaml | 68 ------- ...-integration-v2-TestTaildrop-postgres.yaml | 68 ------- .../test-integration-v2-TestTaildrop.yaml | 68 ------- ...ailscaleNodesJoiningHeadcale-postgres.yaml | 68 ------- ...-v2-TestTailscaleNodesJoiningHeadcale.yaml | 68 ------- ...tegration-v2-TestUserCommand-postgres.yaml | 68 ------- .../test-integration-v2-TestUserCommand.yaml | 68 ------- .github/workflows/test-integration.yaml | 109 +++++++++++ cmd/gh-action-integration-generator/main.go | 174 +++--------------- flake.nix | 2 + 96 files changed, 181 insertions(+), 6401 deletions(-) create mode 100644 .github/workflows/check-tests.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLAllowStarDst-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLAllowStarDst.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLAllowUser80Dst-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLAllowUser80Dst.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLAllowUserDst-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLAllowUserDst.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLDenyAllPort80-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLDenyAllPort80.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLHostsInNetMapTable-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLHostsInNetMapTable.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLNamedHostsCanReach-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLNamedHostsCanReach.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet.yaml delete mode 100644 .github/workflows/test-integration-v2-TestApiKeyCommand-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestApiKeyCommand.yaml delete mode 100644 .github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin.yaml delete mode 100644 .github/workflows/test-integration-v2-TestAuthWebFlowAuthenticationPingAll-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestAuthWebFlowAuthenticationPingAll.yaml delete mode 100644 .github/workflows/test-integration-v2-TestAuthWebFlowLogoutAndRelogin-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestAuthWebFlowLogoutAndRelogin.yaml delete mode 100644 .github/workflows/test-integration-v2-TestCreateTailscale-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestCreateTailscale.yaml delete mode 100644 .github/workflows/test-integration-v2-TestDERPServerScenario-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestDERPServerScenario.yaml delete mode 100644 .github/workflows/test-integration-v2-TestEnableDisableAutoApprovedRoute-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestEnableDisableAutoApprovedRoute.yaml delete mode 100644 .github/workflows/test-integration-v2-TestEnablingRoutes-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestEnablingRoutes.yaml delete mode 100644 .github/workflows/test-integration-v2-TestEphemeral-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestEphemeral.yaml delete mode 100644 .github/workflows/test-integration-v2-TestExpireNode-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestExpireNode.yaml delete mode 100644 .github/workflows/test-integration-v2-TestHASubnetRouterFailover-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestHASubnetRouterFailover.yaml delete mode 100644 .github/workflows/test-integration-v2-TestHeadscale-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestHeadscale.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeAdvertiseTagNoACLCommand-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeAdvertiseTagNoACLCommand.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeAdvertiseTagWithACLCommand-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeAdvertiseTagWithACLCommand.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeCommand-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeCommand.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeExpireCommand-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeExpireCommand.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeMoveCommand-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeMoveCommand.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeOnlineLastSeenStatus-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeOnlineLastSeenStatus.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeRenameCommand-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeRenameCommand.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeTagCommand-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestNodeTagCommand.yaml delete mode 100644 .github/workflows/test-integration-v2-TestOIDCAuthenticationPingAll-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestOIDCAuthenticationPingAll.yaml delete mode 100644 .github/workflows/test-integration-v2-TestOIDCExpireNodesBasedOnTokenExpiry-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestOIDCExpireNodesBasedOnTokenExpiry.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPingAllByHostname-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPingAllByHostname.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPingAllByIP-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPingAllByIP.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPingAllByIPPublicDERP-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPingAllByIPPublicDERP.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPreAuthKeyCommand-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPreAuthKeyCommand.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPreAuthKeyCommandReusableEphemeral-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPreAuthKeyCommandReusableEphemeral.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPreAuthKeyCommandWithoutExpiry-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestPreAuthKeyCommandWithoutExpiry.yaml delete mode 100644 .github/workflows/test-integration-v2-TestResolveMagicDNS-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestResolveMagicDNS.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSSHIsBlockedInACL-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSSHIsBlockedInACL.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSSHMultipleUsersAllToAll-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSSHMultipleUsersAllToAll.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSSHNoSSHConfigured-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSSHNoSSHConfigured.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSSHOneUserToAll-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSSHOneUserToAll.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSSHUserOnlyIsolation-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSSHUserOnlyIsolation.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSubnetRouteACL-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestSubnetRouteACL.yaml delete mode 100644 .github/workflows/test-integration-v2-TestTaildrop-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestTaildrop.yaml delete mode 100644 .github/workflows/test-integration-v2-TestTailscaleNodesJoiningHeadcale-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestTailscaleNodesJoiningHeadcale.yaml delete mode 100644 .github/workflows/test-integration-v2-TestUserCommand-postgres.yaml delete mode 100644 .github/workflows/test-integration-v2-TestUserCommand.yaml create mode 100644 .github/workflows/test-integration.yaml diff --git a/.github/workflows/check-tests.yaml b/.github/workflows/check-tests.yaml new file mode 100644 index 00000000..c085f178 --- /dev/null +++ b/.github/workflows/check-tests.yaml @@ -0,0 +1,41 @@ +name: Check integration tests workflow + +on: [pull_request] + +concurrency: + group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + check-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v34 + with: + files: | + *.nix + go.* + **/*.go + integration_test/ + config-example.yaml + + - uses: DeterminateSystems/nix-installer-action@main + if: steps.changed-files.outputs.any_changed == 'true' + - uses: DeterminateSystems/magic-nix-cache-action@main + if: steps.changed-files.outputs.any_changed == 'true' + + - name: Generate and check integration tests + if: steps.changed-files.outputs.any_changed == 'true' + run: | + nix develop --command bash -c "cd cmd/gh-action-integration-generator/ && go generate" + git diff --exit-code .github/workflows/test-integration.yaml + + - name: Show missing tests + if: failure() + run: | + git diff .github/workflows/test-integration.yaml diff --git a/.github/workflows/test-integration-v2-TestACLAllowStarDst-postgres.yaml b/.github/workflows/test-integration-v2-TestACLAllowStarDst-postgres.yaml deleted file mode 100644 index fdac9774..00000000 --- a/.github/workflows/test-integration-v2-TestACLAllowStarDst-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLAllowStarDst-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLAllowStarDst-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLAllowStarDst-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLAllowStarDst$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLAllowStarDst.yaml b/.github/workflows/test-integration-v2-TestACLAllowStarDst.yaml deleted file mode 100644 index 1e104019..00000000 --- a/.github/workflows/test-integration-v2-TestACLAllowStarDst.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLAllowStarDst - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLAllowStarDst: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLAllowStarDst - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLAllowStarDst$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLAllowUser80Dst-postgres.yaml b/.github/workflows/test-integration-v2-TestACLAllowUser80Dst-postgres.yaml deleted file mode 100644 index 9c3a23d9..00000000 --- a/.github/workflows/test-integration-v2-TestACLAllowUser80Dst-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLAllowUser80Dst-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLAllowUser80Dst-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLAllowUser80Dst-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLAllowUser80Dst$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLAllowUser80Dst.yaml b/.github/workflows/test-integration-v2-TestACLAllowUser80Dst.yaml deleted file mode 100644 index f0d6b5cf..00000000 --- a/.github/workflows/test-integration-v2-TestACLAllowUser80Dst.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLAllowUser80Dst - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLAllowUser80Dst: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLAllowUser80Dst - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLAllowUser80Dst$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLAllowUserDst-postgres.yaml b/.github/workflows/test-integration-v2-TestACLAllowUserDst-postgres.yaml deleted file mode 100644 index a9c04f5f..00000000 --- a/.github/workflows/test-integration-v2-TestACLAllowUserDst-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLAllowUserDst-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLAllowUserDst-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLAllowUserDst-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLAllowUserDst$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLAllowUserDst.yaml b/.github/workflows/test-integration-v2-TestACLAllowUserDst.yaml deleted file mode 100644 index 483179af..00000000 --- a/.github/workflows/test-integration-v2-TestACLAllowUserDst.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLAllowUserDst - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLAllowUserDst: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLAllowUserDst - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLAllowUserDst$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLDenyAllPort80-postgres.yaml b/.github/workflows/test-integration-v2-TestACLDenyAllPort80-postgres.yaml deleted file mode 100644 index 948215df..00000000 --- a/.github/workflows/test-integration-v2-TestACLDenyAllPort80-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLDenyAllPort80-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLDenyAllPort80-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLDenyAllPort80-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLDenyAllPort80$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLDenyAllPort80.yaml b/.github/workflows/test-integration-v2-TestACLDenyAllPort80.yaml deleted file mode 100644 index aa9e0de7..00000000 --- a/.github/workflows/test-integration-v2-TestACLDenyAllPort80.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLDenyAllPort80 - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLDenyAllPort80: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLDenyAllPort80 - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLDenyAllPort80$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2-postgres.yaml b/.github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2-postgres.yaml deleted file mode 100644 index a8a9a3cf..00000000 --- a/.github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLDevice1CanAccessDevice2-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLDevice1CanAccessDevice2-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLDevice1CanAccessDevice2-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLDevice1CanAccessDevice2$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2.yaml b/.github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2.yaml deleted file mode 100644 index 4b60815e..00000000 --- a/.github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLDevice1CanAccessDevice2 - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLDevice1CanAccessDevice2: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLDevice1CanAccessDevice2 - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLDevice1CanAccessDevice2$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLHostsInNetMapTable-postgres.yaml b/.github/workflows/test-integration-v2-TestACLHostsInNetMapTable-postgres.yaml deleted file mode 100644 index 73237bbe..00000000 --- a/.github/workflows/test-integration-v2-TestACLHostsInNetMapTable-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLHostsInNetMapTable-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLHostsInNetMapTable-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLHostsInNetMapTable-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLHostsInNetMapTable$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLHostsInNetMapTable.yaml b/.github/workflows/test-integration-v2-TestACLHostsInNetMapTable.yaml deleted file mode 100644 index e9cfeb23..00000000 --- a/.github/workflows/test-integration-v2-TestACLHostsInNetMapTable.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLHostsInNetMapTable - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLHostsInNetMapTable: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLHostsInNetMapTable - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLHostsInNetMapTable$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLNamedHostsCanReach-postgres.yaml b/.github/workflows/test-integration-v2-TestACLNamedHostsCanReach-postgres.yaml deleted file mode 100644 index f3871412..00000000 --- a/.github/workflows/test-integration-v2-TestACLNamedHostsCanReach-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLNamedHostsCanReach-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLNamedHostsCanReach-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLNamedHostsCanReach-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLNamedHostsCanReach$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLNamedHostsCanReach.yaml b/.github/workflows/test-integration-v2-TestACLNamedHostsCanReach.yaml deleted file mode 100644 index 1b99fc29..00000000 --- a/.github/workflows/test-integration-v2-TestACLNamedHostsCanReach.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLNamedHostsCanReach - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLNamedHostsCanReach: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLNamedHostsCanReach - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLNamedHostsCanReach$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet-postgres.yaml b/.github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet-postgres.yaml deleted file mode 100644 index 0343b0b9..00000000 --- a/.github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLNamedHostsCanReachBySubnet-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLNamedHostsCanReachBySubnet-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLNamedHostsCanReachBySubnet-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLNamedHostsCanReachBySubnet$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet.yaml b/.github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet.yaml deleted file mode 100644 index e323110f..00000000 --- a/.github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestACLNamedHostsCanReachBySubnet - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestACLNamedHostsCanReachBySubnet: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestACLNamedHostsCanReachBySubnet - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestACLNamedHostsCanReachBySubnet$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestApiKeyCommand-postgres.yaml b/.github/workflows/test-integration-v2-TestApiKeyCommand-postgres.yaml deleted file mode 100644 index 48e6db83..00000000 --- a/.github/workflows/test-integration-v2-TestApiKeyCommand-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestApiKeyCommand-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestApiKeyCommand-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestApiKeyCommand-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestApiKeyCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestApiKeyCommand.yaml b/.github/workflows/test-integration-v2-TestApiKeyCommand.yaml deleted file mode 100644 index edf50527..00000000 --- a/.github/workflows/test-integration-v2-TestApiKeyCommand.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestApiKeyCommand - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestApiKeyCommand: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestApiKeyCommand - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestApiKeyCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin-postgres.yaml b/.github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin-postgres.yaml deleted file mode 100644 index 670acb53..00000000 --- a/.github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestAuthKeyLogoutAndRelogin-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestAuthKeyLogoutAndRelogin-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestAuthKeyLogoutAndRelogin-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestAuthKeyLogoutAndRelogin$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin.yaml b/.github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin.yaml deleted file mode 100644 index 17bb803e..00000000 --- a/.github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestAuthKeyLogoutAndRelogin - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestAuthKeyLogoutAndRelogin: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestAuthKeyLogoutAndRelogin - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestAuthKeyLogoutAndRelogin$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestAuthWebFlowAuthenticationPingAll-postgres.yaml b/.github/workflows/test-integration-v2-TestAuthWebFlowAuthenticationPingAll-postgres.yaml deleted file mode 100644 index d2a54168..00000000 --- a/.github/workflows/test-integration-v2-TestAuthWebFlowAuthenticationPingAll-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestAuthWebFlowAuthenticationPingAll-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestAuthWebFlowAuthenticationPingAll-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestAuthWebFlowAuthenticationPingAll-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestAuthWebFlowAuthenticationPingAll$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestAuthWebFlowAuthenticationPingAll.yaml b/.github/workflows/test-integration-v2-TestAuthWebFlowAuthenticationPingAll.yaml deleted file mode 100644 index 0bd94ff9..00000000 --- a/.github/workflows/test-integration-v2-TestAuthWebFlowAuthenticationPingAll.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestAuthWebFlowAuthenticationPingAll - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestAuthWebFlowAuthenticationPingAll: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestAuthWebFlowAuthenticationPingAll - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestAuthWebFlowAuthenticationPingAll$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestAuthWebFlowLogoutAndRelogin-postgres.yaml b/.github/workflows/test-integration-v2-TestAuthWebFlowLogoutAndRelogin-postgres.yaml deleted file mode 100644 index 50a4da84..00000000 --- a/.github/workflows/test-integration-v2-TestAuthWebFlowLogoutAndRelogin-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestAuthWebFlowLogoutAndRelogin-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestAuthWebFlowLogoutAndRelogin-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestAuthWebFlowLogoutAndRelogin-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestAuthWebFlowLogoutAndRelogin$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestAuthWebFlowLogoutAndRelogin.yaml b/.github/workflows/test-integration-v2-TestAuthWebFlowLogoutAndRelogin.yaml deleted file mode 100644 index f0077e73..00000000 --- a/.github/workflows/test-integration-v2-TestAuthWebFlowLogoutAndRelogin.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestAuthWebFlowLogoutAndRelogin - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestAuthWebFlowLogoutAndRelogin: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestAuthWebFlowLogoutAndRelogin - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestAuthWebFlowLogoutAndRelogin$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestCreateTailscale-postgres.yaml b/.github/workflows/test-integration-v2-TestCreateTailscale-postgres.yaml deleted file mode 100644 index d80ec300..00000000 --- a/.github/workflows/test-integration-v2-TestCreateTailscale-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestCreateTailscale-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestCreateTailscale-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestCreateTailscale-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestCreateTailscale$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestCreateTailscale.yaml b/.github/workflows/test-integration-v2-TestCreateTailscale.yaml deleted file mode 100644 index 181d47ac..00000000 --- a/.github/workflows/test-integration-v2-TestCreateTailscale.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestCreateTailscale - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestCreateTailscale: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestCreateTailscale - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestCreateTailscale$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestDERPServerScenario-postgres.yaml b/.github/workflows/test-integration-v2-TestDERPServerScenario-postgres.yaml deleted file mode 100644 index 4f60a311..00000000 --- a/.github/workflows/test-integration-v2-TestDERPServerScenario-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestDERPServerScenario-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestDERPServerScenario-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestDERPServerScenario-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestDERPServerScenario$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestDERPServerScenario.yaml b/.github/workflows/test-integration-v2-TestDERPServerScenario.yaml deleted file mode 100644 index a1fe484b..00000000 --- a/.github/workflows/test-integration-v2-TestDERPServerScenario.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestDERPServerScenario - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestDERPServerScenario: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestDERPServerScenario - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestDERPServerScenario$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestEnableDisableAutoApprovedRoute-postgres.yaml b/.github/workflows/test-integration-v2-TestEnableDisableAutoApprovedRoute-postgres.yaml deleted file mode 100644 index 17da75c8..00000000 --- a/.github/workflows/test-integration-v2-TestEnableDisableAutoApprovedRoute-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestEnableDisableAutoApprovedRoute-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestEnableDisableAutoApprovedRoute-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestEnableDisableAutoApprovedRoute-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestEnableDisableAutoApprovedRoute$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestEnableDisableAutoApprovedRoute.yaml b/.github/workflows/test-integration-v2-TestEnableDisableAutoApprovedRoute.yaml deleted file mode 100644 index 0236cee0..00000000 --- a/.github/workflows/test-integration-v2-TestEnableDisableAutoApprovedRoute.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestEnableDisableAutoApprovedRoute - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestEnableDisableAutoApprovedRoute: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestEnableDisableAutoApprovedRoute - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestEnableDisableAutoApprovedRoute$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestEnablingRoutes-postgres.yaml b/.github/workflows/test-integration-v2-TestEnablingRoutes-postgres.yaml deleted file mode 100644 index d8e90580..00000000 --- a/.github/workflows/test-integration-v2-TestEnablingRoutes-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestEnablingRoutes-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestEnablingRoutes-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestEnablingRoutes-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestEnablingRoutes$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestEnablingRoutes.yaml b/.github/workflows/test-integration-v2-TestEnablingRoutes.yaml deleted file mode 100644 index 6dbc36d9..00000000 --- a/.github/workflows/test-integration-v2-TestEnablingRoutes.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestEnablingRoutes - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestEnablingRoutes: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestEnablingRoutes - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestEnablingRoutes$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestEphemeral-postgres.yaml b/.github/workflows/test-integration-v2-TestEphemeral-postgres.yaml deleted file mode 100644 index 2f3f3a10..00000000 --- a/.github/workflows/test-integration-v2-TestEphemeral-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestEphemeral-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestEphemeral-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestEphemeral-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestEphemeral$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestEphemeral.yaml b/.github/workflows/test-integration-v2-TestEphemeral.yaml deleted file mode 100644 index fbcdf097..00000000 --- a/.github/workflows/test-integration-v2-TestEphemeral.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestEphemeral - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestEphemeral: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestEphemeral - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestEphemeral$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestExpireNode-postgres.yaml b/.github/workflows/test-integration-v2-TestExpireNode-postgres.yaml deleted file mode 100644 index bc82cab6..00000000 --- a/.github/workflows/test-integration-v2-TestExpireNode-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestExpireNode-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestExpireNode-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestExpireNode-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestExpireNode$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestExpireNode.yaml b/.github/workflows/test-integration-v2-TestExpireNode.yaml deleted file mode 100644 index 50d721bb..00000000 --- a/.github/workflows/test-integration-v2-TestExpireNode.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestExpireNode - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestExpireNode: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestExpireNode - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestExpireNode$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestHASubnetRouterFailover-postgres.yaml b/.github/workflows/test-integration-v2-TestHASubnetRouterFailover-postgres.yaml deleted file mode 100644 index d63ee626..00000000 --- a/.github/workflows/test-integration-v2-TestHASubnetRouterFailover-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestHASubnetRouterFailover-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestHASubnetRouterFailover-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestHASubnetRouterFailover-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestHASubnetRouterFailover$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestHASubnetRouterFailover.yaml b/.github/workflows/test-integration-v2-TestHASubnetRouterFailover.yaml deleted file mode 100644 index b926bb4b..00000000 --- a/.github/workflows/test-integration-v2-TestHASubnetRouterFailover.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestHASubnetRouterFailover - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestHASubnetRouterFailover: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestHASubnetRouterFailover - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestHASubnetRouterFailover$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestHeadscale-postgres.yaml b/.github/workflows/test-integration-v2-TestHeadscale-postgres.yaml deleted file mode 100644 index f652a2a2..00000000 --- a/.github/workflows/test-integration-v2-TestHeadscale-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestHeadscale-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestHeadscale-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestHeadscale-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestHeadscale$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestHeadscale.yaml b/.github/workflows/test-integration-v2-TestHeadscale.yaml deleted file mode 100644 index 59e6d653..00000000 --- a/.github/workflows/test-integration-v2-TestHeadscale.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestHeadscale - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestHeadscale: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestHeadscale - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestHeadscale$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeAdvertiseTagNoACLCommand-postgres.yaml b/.github/workflows/test-integration-v2-TestNodeAdvertiseTagNoACLCommand-postgres.yaml deleted file mode 100644 index 68a8a132..00000000 --- a/.github/workflows/test-integration-v2-TestNodeAdvertiseTagNoACLCommand-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeAdvertiseTagNoACLCommand-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeAdvertiseTagNoACLCommand-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeAdvertiseTagNoACLCommand-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeAdvertiseTagNoACLCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeAdvertiseTagNoACLCommand.yaml b/.github/workflows/test-integration-v2-TestNodeAdvertiseTagNoACLCommand.yaml deleted file mode 100644 index 3ce3fb3b..00000000 --- a/.github/workflows/test-integration-v2-TestNodeAdvertiseTagNoACLCommand.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeAdvertiseTagNoACLCommand - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeAdvertiseTagNoACLCommand: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeAdvertiseTagNoACLCommand - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeAdvertiseTagNoACLCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeAdvertiseTagWithACLCommand-postgres.yaml b/.github/workflows/test-integration-v2-TestNodeAdvertiseTagWithACLCommand-postgres.yaml deleted file mode 100644 index d496abd8..00000000 --- a/.github/workflows/test-integration-v2-TestNodeAdvertiseTagWithACLCommand-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeAdvertiseTagWithACLCommand-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeAdvertiseTagWithACLCommand-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeAdvertiseTagWithACLCommand-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeAdvertiseTagWithACLCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeAdvertiseTagWithACLCommand.yaml b/.github/workflows/test-integration-v2-TestNodeAdvertiseTagWithACLCommand.yaml deleted file mode 100644 index 2b26dbd4..00000000 --- a/.github/workflows/test-integration-v2-TestNodeAdvertiseTagWithACLCommand.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeAdvertiseTagWithACLCommand - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeAdvertiseTagWithACLCommand: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeAdvertiseTagWithACLCommand - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeAdvertiseTagWithACLCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeCommand-postgres.yaml b/.github/workflows/test-integration-v2-TestNodeCommand-postgres.yaml deleted file mode 100644 index 8e6c1e11..00000000 --- a/.github/workflows/test-integration-v2-TestNodeCommand-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeCommand-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeCommand-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeCommand-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeCommand.yaml b/.github/workflows/test-integration-v2-TestNodeCommand.yaml deleted file mode 100644 index 4c0f5fc0..00000000 --- a/.github/workflows/test-integration-v2-TestNodeCommand.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeCommand - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeCommand: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeCommand - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeExpireCommand-postgres.yaml b/.github/workflows/test-integration-v2-TestNodeExpireCommand-postgres.yaml deleted file mode 100644 index 3bb62cc5..00000000 --- a/.github/workflows/test-integration-v2-TestNodeExpireCommand-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeExpireCommand-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeExpireCommand-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeExpireCommand-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeExpireCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeExpireCommand.yaml b/.github/workflows/test-integration-v2-TestNodeExpireCommand.yaml deleted file mode 100644 index 5654a7ab..00000000 --- a/.github/workflows/test-integration-v2-TestNodeExpireCommand.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeExpireCommand - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeExpireCommand: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeExpireCommand - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeExpireCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeMoveCommand-postgres.yaml b/.github/workflows/test-integration-v2-TestNodeMoveCommand-postgres.yaml deleted file mode 100644 index 8c947d7c..00000000 --- a/.github/workflows/test-integration-v2-TestNodeMoveCommand-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeMoveCommand-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeMoveCommand-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeMoveCommand-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeMoveCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeMoveCommand.yaml b/.github/workflows/test-integration-v2-TestNodeMoveCommand.yaml deleted file mode 100644 index e5af4412..00000000 --- a/.github/workflows/test-integration-v2-TestNodeMoveCommand.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeMoveCommand - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeMoveCommand: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeMoveCommand - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeMoveCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeOnlineLastSeenStatus-postgres.yaml b/.github/workflows/test-integration-v2-TestNodeOnlineLastSeenStatus-postgres.yaml deleted file mode 100644 index 7197f8af..00000000 --- a/.github/workflows/test-integration-v2-TestNodeOnlineLastSeenStatus-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeOnlineLastSeenStatus-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeOnlineLastSeenStatus-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeOnlineLastSeenStatus-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeOnlineLastSeenStatus$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeOnlineLastSeenStatus.yaml b/.github/workflows/test-integration-v2-TestNodeOnlineLastSeenStatus.yaml deleted file mode 100644 index fc38e0dd..00000000 --- a/.github/workflows/test-integration-v2-TestNodeOnlineLastSeenStatus.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeOnlineLastSeenStatus - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeOnlineLastSeenStatus: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeOnlineLastSeenStatus - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeOnlineLastSeenStatus$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeRenameCommand-postgres.yaml b/.github/workflows/test-integration-v2-TestNodeRenameCommand-postgres.yaml deleted file mode 100644 index 0ba311cf..00000000 --- a/.github/workflows/test-integration-v2-TestNodeRenameCommand-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeRenameCommand-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeRenameCommand-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeRenameCommand-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeRenameCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeRenameCommand.yaml b/.github/workflows/test-integration-v2-TestNodeRenameCommand.yaml deleted file mode 100644 index a6f77296..00000000 --- a/.github/workflows/test-integration-v2-TestNodeRenameCommand.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeRenameCommand - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeRenameCommand: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeRenameCommand - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeRenameCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeTagCommand-postgres.yaml b/.github/workflows/test-integration-v2-TestNodeTagCommand-postgres.yaml deleted file mode 100644 index c18fd64b..00000000 --- a/.github/workflows/test-integration-v2-TestNodeTagCommand-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeTagCommand-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeTagCommand-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeTagCommand-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeTagCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestNodeTagCommand.yaml b/.github/workflows/test-integration-v2-TestNodeTagCommand.yaml deleted file mode 100644 index d3f1b745..00000000 --- a/.github/workflows/test-integration-v2-TestNodeTagCommand.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestNodeTagCommand - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestNodeTagCommand: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestNodeTagCommand - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestNodeTagCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestOIDCAuthenticationPingAll-postgres.yaml b/.github/workflows/test-integration-v2-TestOIDCAuthenticationPingAll-postgres.yaml deleted file mode 100644 index 25b3c820..00000000 --- a/.github/workflows/test-integration-v2-TestOIDCAuthenticationPingAll-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestOIDCAuthenticationPingAll-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestOIDCAuthenticationPingAll-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestOIDCAuthenticationPingAll-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestOIDCAuthenticationPingAll$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestOIDCAuthenticationPingAll.yaml b/.github/workflows/test-integration-v2-TestOIDCAuthenticationPingAll.yaml deleted file mode 100644 index 7da113ec..00000000 --- a/.github/workflows/test-integration-v2-TestOIDCAuthenticationPingAll.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestOIDCAuthenticationPingAll - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestOIDCAuthenticationPingAll: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestOIDCAuthenticationPingAll - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestOIDCAuthenticationPingAll$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestOIDCExpireNodesBasedOnTokenExpiry-postgres.yaml b/.github/workflows/test-integration-v2-TestOIDCExpireNodesBasedOnTokenExpiry-postgres.yaml deleted file mode 100644 index b7557200..00000000 --- a/.github/workflows/test-integration-v2-TestOIDCExpireNodesBasedOnTokenExpiry-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestOIDCExpireNodesBasedOnTokenExpiry-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestOIDCExpireNodesBasedOnTokenExpiry-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestOIDCExpireNodesBasedOnTokenExpiry-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestOIDCExpireNodesBasedOnTokenExpiry$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestOIDCExpireNodesBasedOnTokenExpiry.yaml b/.github/workflows/test-integration-v2-TestOIDCExpireNodesBasedOnTokenExpiry.yaml deleted file mode 100644 index 8b3a5a81..00000000 --- a/.github/workflows/test-integration-v2-TestOIDCExpireNodesBasedOnTokenExpiry.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestOIDCExpireNodesBasedOnTokenExpiry - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestOIDCExpireNodesBasedOnTokenExpiry: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestOIDCExpireNodesBasedOnTokenExpiry - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestOIDCExpireNodesBasedOnTokenExpiry$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPingAllByHostname-postgres.yaml b/.github/workflows/test-integration-v2-TestPingAllByHostname-postgres.yaml deleted file mode 100644 index 869d18b0..00000000 --- a/.github/workflows/test-integration-v2-TestPingAllByHostname-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPingAllByHostname-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPingAllByHostname-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPingAllByHostname$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPingAllByHostname.yaml b/.github/workflows/test-integration-v2-TestPingAllByHostname.yaml deleted file mode 100644 index cbed2dc9..00000000 --- a/.github/workflows/test-integration-v2-TestPingAllByHostname.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPingAllByHostname: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPingAllByHostname - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPingAllByHostname$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPingAllByIP-postgres.yaml b/.github/workflows/test-integration-v2-TestPingAllByIP-postgres.yaml deleted file mode 100644 index e924304a..00000000 --- a/.github/workflows/test-integration-v2-TestPingAllByIP-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestPingAllByIP-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPingAllByIP-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPingAllByIP-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPingAllByIP$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPingAllByIP.yaml b/.github/workflows/test-integration-v2-TestPingAllByIP.yaml deleted file mode 100644 index 0dd5c7ed..00000000 --- a/.github/workflows/test-integration-v2-TestPingAllByIP.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestPingAllByIP - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPingAllByIP: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPingAllByIP - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPingAllByIP$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPingAllByIPPublicDERP-postgres.yaml b/.github/workflows/test-integration-v2-TestPingAllByIPPublicDERP-postgres.yaml deleted file mode 100644 index fe9d3d66..00000000 --- a/.github/workflows/test-integration-v2-TestPingAllByIPPublicDERP-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestPingAllByIPPublicDERP-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPingAllByIPPublicDERP-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPingAllByIPPublicDERP-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPingAllByIPPublicDERP$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPingAllByIPPublicDERP.yaml b/.github/workflows/test-integration-v2-TestPingAllByIPPublicDERP.yaml deleted file mode 100644 index 8418f767..00000000 --- a/.github/workflows/test-integration-v2-TestPingAllByIPPublicDERP.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestPingAllByIPPublicDERP - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPingAllByIPPublicDERP: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPingAllByIPPublicDERP - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPingAllByIPPublicDERP$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPreAuthKeyCommand-postgres.yaml b/.github/workflows/test-integration-v2-TestPreAuthKeyCommand-postgres.yaml deleted file mode 100644 index 7618e5e5..00000000 --- a/.github/workflows/test-integration-v2-TestPreAuthKeyCommand-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestPreAuthKeyCommand-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPreAuthKeyCommand-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPreAuthKeyCommand-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPreAuthKeyCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPreAuthKeyCommand.yaml b/.github/workflows/test-integration-v2-TestPreAuthKeyCommand.yaml deleted file mode 100644 index 472def3f..00000000 --- a/.github/workflows/test-integration-v2-TestPreAuthKeyCommand.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestPreAuthKeyCommand - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPreAuthKeyCommand: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPreAuthKeyCommand - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPreAuthKeyCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPreAuthKeyCommandReusableEphemeral-postgres.yaml b/.github/workflows/test-integration-v2-TestPreAuthKeyCommandReusableEphemeral-postgres.yaml deleted file mode 100644 index 363c094e..00000000 --- a/.github/workflows/test-integration-v2-TestPreAuthKeyCommandReusableEphemeral-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestPreAuthKeyCommandReusableEphemeral-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPreAuthKeyCommandReusableEphemeral-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPreAuthKeyCommandReusableEphemeral-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPreAuthKeyCommandReusableEphemeral$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPreAuthKeyCommandReusableEphemeral.yaml b/.github/workflows/test-integration-v2-TestPreAuthKeyCommandReusableEphemeral.yaml deleted file mode 100644 index 1c8b943c..00000000 --- a/.github/workflows/test-integration-v2-TestPreAuthKeyCommandReusableEphemeral.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestPreAuthKeyCommandReusableEphemeral - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPreAuthKeyCommandReusableEphemeral: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPreAuthKeyCommandReusableEphemeral - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPreAuthKeyCommandReusableEphemeral$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPreAuthKeyCommandWithoutExpiry-postgres.yaml b/.github/workflows/test-integration-v2-TestPreAuthKeyCommandWithoutExpiry-postgres.yaml deleted file mode 100644 index 5bfa959f..00000000 --- a/.github/workflows/test-integration-v2-TestPreAuthKeyCommandWithoutExpiry-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestPreAuthKeyCommandWithoutExpiry-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPreAuthKeyCommandWithoutExpiry-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPreAuthKeyCommandWithoutExpiry-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPreAuthKeyCommandWithoutExpiry$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestPreAuthKeyCommandWithoutExpiry.yaml b/.github/workflows/test-integration-v2-TestPreAuthKeyCommandWithoutExpiry.yaml deleted file mode 100644 index d44f9ca0..00000000 --- a/.github/workflows/test-integration-v2-TestPreAuthKeyCommandWithoutExpiry.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestPreAuthKeyCommandWithoutExpiry - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestPreAuthKeyCommandWithoutExpiry: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestPreAuthKeyCommandWithoutExpiry - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestPreAuthKeyCommandWithoutExpiry$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestResolveMagicDNS-postgres.yaml b/.github/workflows/test-integration-v2-TestResolveMagicDNS-postgres.yaml deleted file mode 100644 index a10d6ef7..00000000 --- a/.github/workflows/test-integration-v2-TestResolveMagicDNS-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestResolveMagicDNS-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestResolveMagicDNS-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestResolveMagicDNS-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestResolveMagicDNS$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestResolveMagicDNS.yaml b/.github/workflows/test-integration-v2-TestResolveMagicDNS.yaml deleted file mode 100644 index 1ebb59ee..00000000 --- a/.github/workflows/test-integration-v2-TestResolveMagicDNS.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestResolveMagicDNS - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestResolveMagicDNS: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestResolveMagicDNS - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestResolveMagicDNS$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSSHIsBlockedInACL-postgres.yaml b/.github/workflows/test-integration-v2-TestSSHIsBlockedInACL-postgres.yaml deleted file mode 100644 index da60d36c..00000000 --- a/.github/workflows/test-integration-v2-TestSSHIsBlockedInACL-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSSHIsBlockedInACL-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSSHIsBlockedInACL-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSSHIsBlockedInACL-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSSHIsBlockedInACL$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSSHIsBlockedInACL.yaml b/.github/workflows/test-integration-v2-TestSSHIsBlockedInACL.yaml deleted file mode 100644 index 8098efce..00000000 --- a/.github/workflows/test-integration-v2-TestSSHIsBlockedInACL.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSSHIsBlockedInACL - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSSHIsBlockedInACL: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSSHIsBlockedInACL - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSSHIsBlockedInACL$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSSHMultipleUsersAllToAll-postgres.yaml b/.github/workflows/test-integration-v2-TestSSHMultipleUsersAllToAll-postgres.yaml deleted file mode 100644 index 944990a7..00000000 --- a/.github/workflows/test-integration-v2-TestSSHMultipleUsersAllToAll-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSSHMultipleUsersAllToAll-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSSHMultipleUsersAllToAll-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSSHMultipleUsersAllToAll-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSSHMultipleUsersAllToAll$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSSHMultipleUsersAllToAll.yaml b/.github/workflows/test-integration-v2-TestSSHMultipleUsersAllToAll.yaml deleted file mode 100644 index 5356fa90..00000000 --- a/.github/workflows/test-integration-v2-TestSSHMultipleUsersAllToAll.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSSHMultipleUsersAllToAll - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSSHMultipleUsersAllToAll: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSSHMultipleUsersAllToAll - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSSHMultipleUsersAllToAll$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSSHNoSSHConfigured-postgres.yaml b/.github/workflows/test-integration-v2-TestSSHNoSSHConfigured-postgres.yaml deleted file mode 100644 index 77633c21..00000000 --- a/.github/workflows/test-integration-v2-TestSSHNoSSHConfigured-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSSHNoSSHConfigured-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSSHNoSSHConfigured-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSSHNoSSHConfigured-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSSHNoSSHConfigured$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSSHNoSSHConfigured.yaml b/.github/workflows/test-integration-v2-TestSSHNoSSHConfigured.yaml deleted file mode 100644 index 346d69d8..00000000 --- a/.github/workflows/test-integration-v2-TestSSHNoSSHConfigured.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSSHNoSSHConfigured - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSSHNoSSHConfigured: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSSHNoSSHConfigured - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSSHNoSSHConfigured$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSSHOneUserToAll-postgres.yaml b/.github/workflows/test-integration-v2-TestSSHOneUserToAll-postgres.yaml deleted file mode 100644 index 10a1334d..00000000 --- a/.github/workflows/test-integration-v2-TestSSHOneUserToAll-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSSHOneUserToAll-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSSHOneUserToAll-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSSHOneUserToAll-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSSHOneUserToAll$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSSHOneUserToAll.yaml b/.github/workflows/test-integration-v2-TestSSHOneUserToAll.yaml deleted file mode 100644 index b696409b..00000000 --- a/.github/workflows/test-integration-v2-TestSSHOneUserToAll.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSSHOneUserToAll - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSSHOneUserToAll: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSSHOneUserToAll - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSSHOneUserToAll$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSSHUserOnlyIsolation-postgres.yaml b/.github/workflows/test-integration-v2-TestSSHUserOnlyIsolation-postgres.yaml deleted file mode 100644 index d4acf63c..00000000 --- a/.github/workflows/test-integration-v2-TestSSHUserOnlyIsolation-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSSHUserOnlyIsolation-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSSHUserOnlyIsolation-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSSHUserOnlyIsolation-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSSHUserOnlyIsolation$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSSHUserOnlyIsolation.yaml b/.github/workflows/test-integration-v2-TestSSHUserOnlyIsolation.yaml deleted file mode 100644 index 7a2dcad4..00000000 --- a/.github/workflows/test-integration-v2-TestSSHUserOnlyIsolation.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSSHUserOnlyIsolation - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSSHUserOnlyIsolation: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSSHUserOnlyIsolation - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSSHUserOnlyIsolation$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSubnetRouteACL-postgres.yaml b/.github/workflows/test-integration-v2-TestSubnetRouteACL-postgres.yaml deleted file mode 100644 index 1bfbbd06..00000000 --- a/.github/workflows/test-integration-v2-TestSubnetRouteACL-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSubnetRouteACL-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSubnetRouteACL-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSubnetRouteACL-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSubnetRouteACL$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestSubnetRouteACL.yaml b/.github/workflows/test-integration-v2-TestSubnetRouteACL.yaml deleted file mode 100644 index ce116c50..00000000 --- a/.github/workflows/test-integration-v2-TestSubnetRouteACL.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestSubnetRouteACL - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestSubnetRouteACL: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestSubnetRouteACL - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestSubnetRouteACL$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestTaildrop-postgres.yaml b/.github/workflows/test-integration-v2-TestTaildrop-postgres.yaml deleted file mode 100644 index 7be2e147..00000000 --- a/.github/workflows/test-integration-v2-TestTaildrop-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestTaildrop-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestTaildrop-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestTaildrop-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestTaildrop$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestTaildrop.yaml b/.github/workflows/test-integration-v2-TestTaildrop.yaml deleted file mode 100644 index 71feba50..00000000 --- a/.github/workflows/test-integration-v2-TestTaildrop.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestTaildrop - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestTaildrop: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestTaildrop - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestTaildrop$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestTailscaleNodesJoiningHeadcale-postgres.yaml b/.github/workflows/test-integration-v2-TestTailscaleNodesJoiningHeadcale-postgres.yaml deleted file mode 100644 index a42767b0..00000000 --- a/.github/workflows/test-integration-v2-TestTailscaleNodesJoiningHeadcale-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestTailscaleNodesJoiningHeadcale-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestTailscaleNodesJoiningHeadcale-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestTailscaleNodesJoiningHeadcale-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestTailscaleNodesJoiningHeadcale$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestTailscaleNodesJoiningHeadcale.yaml b/.github/workflows/test-integration-v2-TestTailscaleNodesJoiningHeadcale.yaml deleted file mode 100644 index 63aff7a5..00000000 --- a/.github/workflows/test-integration-v2-TestTailscaleNodesJoiningHeadcale.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestTailscaleNodesJoiningHeadcale - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestTailscaleNodesJoiningHeadcale: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestTailscaleNodesJoiningHeadcale - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestTailscaleNodesJoiningHeadcale$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestUserCommand-postgres.yaml b/.github/workflows/test-integration-v2-TestUserCommand-postgres.yaml deleted file mode 100644 index 50871908..00000000 --- a/.github/workflows/test-integration-v2-TestUserCommand-postgres.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestUserCommand-postgres - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestUserCommand-postgres: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestUserCommand-postgres - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=1 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestUserCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration-v2-TestUserCommand.yaml b/.github/workflows/test-integration-v2-TestUserCommand.yaml deleted file mode 100644 index 1e91b4ea..00000000 --- a/.github/workflows/test-integration-v2-TestUserCommand.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# 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 - TestUserCommand - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - TestUserCommand: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run TestUserCommand - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES=0 \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^TestUserCommand$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" diff --git a/.github/workflows/test-integration.yaml b/.github/workflows/test-integration.yaml new file mode 100644 index 00000000..bad05bce --- /dev/null +++ b/.github/workflows/test-integration.yaml @@ -0,0 +1,109 @@ +name: Integration Tests +on: [pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +jobs: + integration-test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + test: + - TestACLHostsInNetMapTable + - TestACLAllowUser80Dst + - TestACLDenyAllPort80 + - TestACLAllowUserDst + - TestACLAllowStarDst + - TestACLNamedHostsCanReachBySubnet + - TestACLNamedHostsCanReach + - TestACLDevice1CanAccessDevice2 + - TestOIDCAuthenticationPingAll + - TestOIDCExpireNodesBasedOnTokenExpiry + - TestAuthWebFlowAuthenticationPingAll + - TestAuthWebFlowLogoutAndRelogin + - TestUserCommand + - TestPreAuthKeyCommand + - TestPreAuthKeyCommandWithoutExpiry + - TestPreAuthKeyCommandReusableEphemeral + - TestApiKeyCommand + - TestNodeTagCommand + - TestNodeAdvertiseTagNoACLCommand + - TestNodeAdvertiseTagWithACLCommand + - TestNodeCommand + - TestNodeExpireCommand + - TestNodeRenameCommand + - TestNodeMoveCommand + - TestDERPServerScenario + - TestPingAllByIP + - TestPingAllByIPPublicDERP + - TestAuthKeyLogoutAndRelogin + - TestEphemeral + - TestPingAllByHostname + - TestTaildrop + - TestResolveMagicDNS + - TestExpireNode + - TestNodeOnlineLastSeenStatus + - TestEnablingRoutes + - TestHASubnetRouterFailover + - TestEnableDisableAutoApprovedRoute + - TestSubnetRouteACL + - TestHeadscale + - TestCreateTailscale + - TestTailscaleNodesJoiningHeadcale + - TestSSHOneUserToAll + - TestSSHMultipleUsersAllToAll + - TestSSHNoSSHConfigured + - TestSSHIsBlockedInACL + - TestSSHUserOnlyIsolation + database: [postgres, sqlite] + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: satackey/action-docker-layer-caching@main + continue-on-error: true + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v34 + with: + files: | + *.nix + go.* + **/*.go + integration_test/ + config-example.yaml + - name: Run Integration Test + uses: Wandalen/wretry.action@master + if: steps.changed-files.outputs.any_changed == 'true' + env: + USE_POSTGRES: ${{ matrix.database == 'postgres' && '1' || '0' }} + with: + attempt_limit: 5 + command: | + 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 \ + --volume $PWD/control_logs:/tmp/control \ + --env HEADSCALE_INTEGRATION_POSTGRES=${{env.USE_POSTGRES}} \ + golang:1 \ + go run gotest.tools/gotestsum@latest -- ./... \ + -failfast \ + -timeout 120m \ + -parallel 1 \ + -run "^${{ matrix.test }}$" + - uses: actions/upload-artifact@v4 + if: always() && steps.changed-files.outputs.any_changed == 'true' + with: + name: ${{ matrix.test }}-${{matrix.database}}-logs + path: "control_logs/*.log" + - uses: actions/upload-artifact@v4 + if: always() && steps.changed-files.outputs.any_changed == 'true' + with: + name: ${{ matrix.test }}-${{matrix.database}}-pprof + path: "control_logs/*.pprof.tar" diff --git a/cmd/gh-action-integration-generator/main.go b/cmd/gh-action-integration-generator/main.go index d71be8ad..35e20250 100644 --- a/cmd/gh-action-integration-generator/main.go +++ b/cmd/gh-action-integration-generator/main.go @@ -6,109 +6,10 @@ import ( "bytes" "fmt" "log" - "os" "os/exec" - "path" - "path/filepath" "strings" - "text/template" ) -var ( - githubWorkflowPath = "../../.github/workflows/" - jobFileNameTemplate = `test-integration-v2-%s.yaml` - jobTemplate = template.Must( - template.New("jobTemplate"). - Parse(`# 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 - {{.Name}} - -on: [pull_request] - -concurrency: - group: {{ "${{ github.workflow }}-$${{ github.head_ref || github.run_id }}" }} - cancel-in-progress: true - -jobs: - {{.Name}}: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: satackey/action-docker-layer-caching@main - continue-on-error: true - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v34 - with: - files: | - *.nix - go.* - **/*.go - integration_test/ - config-example.yaml - - - name: Run {{.Name}} - uses: Wandalen/wretry.action@master - if: steps.changed-files.outputs.any_changed == 'true' - with: - attempt_limit: 5 - command: | - 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 \ - --volume $PWD/control_logs:/tmp/control \ - --env HEADSCALE_INTEGRATION_POSTGRES={{ if .Postgres }}1{{ else }}0{{ end }} \ - golang:1 \ - go run gotest.tools/gotestsum@latest -- ./... \ - -failfast \ - -timeout 120m \ - -parallel 1 \ - -run "^{{.Test}}$" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: logs - path: "control_logs/*.log" - - - uses: actions/upload-artifact@v3 - if: always() && steps.changed-files.outputs.any_changed == 'true' - with: - name: pprof - path: "control_logs/*.pprof.tar" -`), - ) -) - -const workflowFilePerm = 0o600 - -func removeTests() { - glob := fmt.Sprintf(jobFileNameTemplate, "*") - - files, err := filepath.Glob(filepath.Join(githubWorkflowPath, glob)) - if err != nil { - log.Fatalf("failed to find test files") - } - - for _, file := range files { - err := os.Remove(file) - if err != nil { - log.Printf("failed to remove: %s", err) - } - } -} - func findTests() []string { rgBin, err := exec.LookPath("rg") if err != nil { @@ -125,61 +26,44 @@ func findTests() []string { "--no-heading", } - log.Printf("executing: %s %s", rgBin, strings.Join(args, " ")) - - ripgrep := exec.Command( - rgBin, - args..., - ) - - result, err := ripgrep.CombinedOutput() + cmd := exec.Command(rgBin, args...) + var out bytes.Buffer + cmd.Stdout = &out + err = cmd.Run() if err != nil { - log.Printf("out: %s", result) - log.Fatalf("failed to run ripgrep: %s", err) + log.Fatalf("failed to run command: %s", err) } - tests := strings.Split(string(result), "\n") - tests = tests[:len(tests)-1] - + tests := strings.Split(strings.TrimSpace(out.String()), "\n") return tests } -func main() { - type testConfig struct { - Name string - Test string - Postgres bool +func updateYAML(tests []string) { + testsForYq := fmt.Sprintf("[%s]", strings.Join(tests, ", ")) + + yqCommand := fmt.Sprintf( + "yq eval '.jobs.integration-test.strategy.matrix.test = %s' ../../.github/workflows/test-integration.yaml -i", + testsForYq, + ) + cmd := exec.Command("bash", "-c", yqCommand) + + var out bytes.Buffer + cmd.Stdout = &out + err := cmd.Run() + if err != nil { + log.Fatalf("failed to run yq command: %s", err) } + fmt.Println("YAML file updated successfully") +} + +func main() { tests := findTests() - removeTests() - - for _, test := range tests { - for _, postgres := range []bool{false, true} { - log.Printf("generating workflow for %s", test) - - name := test - if postgres { - name = test + "-postgres" - } - - var content bytes.Buffer - - if err := jobTemplate.Execute(&content, testConfig{ - Name: name, - Test: test, - Postgres: postgres, - }); err != nil { - log.Fatalf("failed to render template: %s", err) - } - - testPath := path.Join(githubWorkflowPath, fmt.Sprintf(jobFileNameTemplate, name)) - - err := os.WriteFile(testPath, content.Bytes(), workflowFilePerm) - if err != nil { - log.Fatalf("failed to write github job: %s", err) - } - } + quotedTests := make([]string, len(tests)) + for i, test := range tests { + quotedTests[i] = fmt.Sprintf("\"%s\"", test) } + + updateYAML(quotedTests) } diff --git a/flake.nix b/flake.nix index 4633e2a6..4eae1d52 100644 --- a/flake.nix +++ b/flake.nix @@ -76,6 +76,8 @@ gotests ksh ko + yq-go + ripgrep # 'dot' is needed for pprof graphs # go tool pprof -http=: