Skip to content

Commit c6f6e43

Browse files
committed
[ci] separate build and testing jobs
Signed-off-by: Andrei Kvapil <[email protected]>
1 parent 0664370 commit c6f6e43

2 files changed

Lines changed: 35 additions & 2 deletions

File tree

‎.github/workflows/pull-requests.yaml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,34 @@ jobs:
3737
- name: Build
3838
run: make build
3939

40+
- name: Upload installer artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: cozystack-installer
44+
path: _out/assets/cozystack-installer.yaml
45+
46+
test:
47+
name: Test
48+
runs-on: [self-hosted]
49+
permissions:
50+
contents: read
51+
packages: write
52+
needs: build
53+
if: |
54+
!contains(github.event.pull_request.labels.*.name, 'release')
55+
56+
steps:
57+
- name: Checkout code
58+
uses: actions/checkout@v4
59+
with:
60+
fetch-depth: 0
61+
fetch-tags: true
62+
63+
- name: Download installer artifact
64+
uses: actions/download-artifact@v4
65+
with:
66+
name: cozystack-installer
67+
path: _out/assets/
68+
4069
- name: Test
4170
run: make test

‎packages/core/testing/Makefile‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ image-e2e-sandbox:
3232

3333
test: test-cluster test-apps ## Run the end-to-end tests in existing sandbox
3434

35-
test-cluster: ## Run the end-to-end for creating a cluster
36-
docker exec "${SANDBOX_NAME}" sh -c 'cd /workspace && export COZYSTACK_INSTALLER_YAML=$$(helm template -n cozy-system installer ./packages/core/installer) && hack/cozytest.sh hack/e2e-cluster.bats'
35+
../../../_out/cozystack-installer.yaml:
36+
mkdir -p ../../../_out
37+
helm template -n cozy-system installer ../installer > ../../../_out/cozystack-installer.yaml
38+
39+
test-cluster: ../../../_out/cozystack-installer.yaml ## Run the end-to-end for creating a cluster
40+
docker exec "${SANDBOX_NAME}" sh -c 'cd /workspace && export COZYSTACK_INSTALLER_YAML=$$(cat ../../../_out/cozystack-installer.yaml) && hack/cozytest.sh hack/e2e-cluster.bats'
3741

3842
test-apps: ## Run the end-to-end tests for apps
3943
docker exec "${SANDBOX_NAME}" sh -c 'cd /workspace && hack/cozytest.sh hack/e2e-apps.bats'

0 commit comments

Comments
 (0)