From 21dd2123494a3b123908d32c73f592f3a8730118 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Thu, 13 Oct 2022 05:50:41 +0200 Subject: [PATCH] Split integration tests into seperate jobs Signed-off-by: Kristoffer Dalby --- .github/workflows/test-integration-cli.yml | 40 +++++++++++++++++++ ...egration.yml => test-integration-derp.yml} | 27 ------------- .../workflows/test-integration-general.yml | 40 +++++++++++++++++++ .github/workflows/test-integration-oidc.yml | 40 +++++++++++++++++++ 4 files changed, 120 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/test-integration-cli.yml rename .github/workflows/{test-integration.yml => test-integration-derp.yml} (51%) create mode 100644 .github/workflows/test-integration-general.yml create mode 100644 .github/workflows/test-integration-oidc.yml diff --git a/.github/workflows/test-integration-cli.yml b/.github/workflows/test-integration-cli.yml new file mode 100644 index 00000000..46f48fd2 --- /dev/null +++ b/.github/workflows/test-integration-cli.yml @@ -0,0 +1,40 @@ +name: CI + +on: [pull_request] + +jobs: + integration-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - name: Set Swap Space + uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 10 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v14.1 + with: + files: | + *.nix + go.* + **/*.go + integration_test/ + config-example.yaml + + - uses: cachix/install-nix-action@v16 + if: steps.changed-files.outputs.any_changed == 'true' + + - name: Run CLI integration tests + if: steps.changed-files.outputs.any_changed == 'true' + uses: nick-fields/retry@v2 + with: + timeout_minutes: 240 + max_attempts: 5 + retry_on: error + command: nix develop --command -- make test_integration_cli diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration-derp.yml similarity index 51% rename from .github/workflows/test-integration.yml rename to .github/workflows/test-integration-derp.yml index f2adfa19..7fd391bb 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration-derp.yml @@ -30,15 +30,6 @@ jobs: - uses: cachix/install-nix-action@v16 if: steps.changed-files.outputs.any_changed == 'true' - - name: Run CLI integration tests - if: steps.changed-files.outputs.any_changed == 'true' - uses: nick-fields/retry@v2 - with: - timeout_minutes: 240 - max_attempts: 5 - retry_on: error - command: nix develop --command -- make test_integration_cli - - name: Run Embedded DERP server integration tests if: steps.changed-files.outputs.any_changed == 'true' uses: nick-fields/retry@v2 @@ -47,21 +38,3 @@ jobs: max_attempts: 5 retry_on: error command: nix develop --command -- make test_integration_derp - - - name: Run OIDC integration tests - if: steps.changed-files.outputs.any_changed == 'true' - uses: nick-fields/retry@v2 - with: - timeout_minutes: 240 - max_attempts: 5 - retry_on: error - command: nix develop --command -- make test_integration_oidc - - - name: Run general integration tests - if: steps.changed-files.outputs.any_changed == 'true' - uses: nick-fields/retry@v2 - with: - timeout_minutes: 240 - max_attempts: 5 - retry_on: error - command: nix develop --command -- make test_integration_general diff --git a/.github/workflows/test-integration-general.yml b/.github/workflows/test-integration-general.yml new file mode 100644 index 00000000..278548dc --- /dev/null +++ b/.github/workflows/test-integration-general.yml @@ -0,0 +1,40 @@ +name: CI + +on: [pull_request] + +jobs: + integration-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - name: Set Swap Space + uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 10 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v14.1 + with: + files: | + *.nix + go.* + **/*.go + integration_test/ + config-example.yaml + + - uses: cachix/install-nix-action@v16 + if: steps.changed-files.outputs.any_changed == 'true' + + - name: Run general integration tests + if: steps.changed-files.outputs.any_changed == 'true' + uses: nick-fields/retry@v2 + with: + timeout_minutes: 240 + max_attempts: 5 + retry_on: error + command: nix develop --command -- make test_integration_general diff --git a/.github/workflows/test-integration-oidc.yml b/.github/workflows/test-integration-oidc.yml new file mode 100644 index 00000000..0f2005c5 --- /dev/null +++ b/.github/workflows/test-integration-oidc.yml @@ -0,0 +1,40 @@ +name: CI + +on: [pull_request] + +jobs: + integration-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - name: Set Swap Space + uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 10 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v14.1 + with: + files: | + *.nix + go.* + **/*.go + integration_test/ + config-example.yaml + + - uses: cachix/install-nix-action@v16 + if: steps.changed-files.outputs.any_changed == 'true' + + - name: Run OIDC integration tests + if: steps.changed-files.outputs.any_changed == 'true' + uses: nick-fields/retry@v2 + with: + timeout_minutes: 240 + max_attempts: 5 + retry_on: error + command: nix develop --command -- make test_integration_oidc