Skip to content

Commit a6456f9

Browse files
committed
test(e2e): add CI workflow and push/pull round‑trip tests
1 parent edd8f4f commit a6456f9

7 files changed

Lines changed: 407 additions & 37 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
name: image-build-push
1+
name: ci
22

33
on:
44
push:
5+
pull_request:
56

67
concurrency:
78
cancel-in-progress: true
@@ -16,35 +17,30 @@ jobs:
1617
contents: read
1718
runs-on: ubuntu-latest
1819
steps:
19-
- name: checkout repository
20-
uses: actions/checkout@v6
20+
- uses: actions/checkout@v4
2121

22-
- name: Install asdf & tools
23-
uses: asdf-vm/actions/install@v4
22+
- uses: actions/setup-go@v5
23+
with:
24+
go-version-file: go.mod
25+
cache: false # golangci-lint-action manages its own cache
26+
27+
- uses: golangci/golangci-lint-action@v6
28+
with:
29+
version: latest
30+
args: --timeout=10m
31+
32+
test:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
2436

25-
- uses: actions/cache@v5
37+
- uses: actions/setup-go@v5
2638
with:
27-
path: |
28-
~/.asdf/installs/golang
29-
~/.asdf/plugins/golang
30-
~/.asdf/installs/golang/*/packages/pkg/mod
31-
~/.cache/go-build
32-
~/.cache/golangci-lint
33-
key: ${{ runner.os }}-golangci-${{ hashFiles('**/go.sum') }}
34-
35-
- name: Run golangci-lint
36-
run: |
37-
set -x
38-
golangci-lint cache status
39-
golangci-lint run --timeout=10m
39+
go-version-file: go.mod
40+
cache: true
4041

4142
- name: Test
42-
run: |
43-
set -x
44-
go test -tags dev ./...
43+
run: go test -tags dev ./...
4544

4645
- name: Build
47-
run: |
48-
set -x
49-
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -extldflags '-static'" -o createos main.go
50-
ldd createos || true
46+
run: CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -extldflags '-static'" -o createos main.go

.github/workflows/e2e.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: e2e
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 3 * * *' # nightly at 03:00 UTC
7+
8+
concurrency:
9+
group: e2e
10+
cancel-in-progress: true
11+
12+
jobs:
13+
e2e:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 35
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
cache: true
23+
24+
- name: Build binary
25+
run: go build -o createos-e2e-bin .
26+
27+
- name: Run E2E tests
28+
env:
29+
CREATEOS_E2E_API_KEY: ${{ secrets.CREATEOS_E2E_API_KEY }}
30+
run: go test -tags=e2e -timeout 30m ./test/e2e/... -v

.github/workflows/nightly.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
permissions:
99
contents: write
1010

11+
concurrency:
12+
group: nightly
13+
cancel-in-progress: true
14+
1115
jobs:
1216
build:
1317
name: build (${{ matrix.goos }}-${{ matrix.goarch }})

.github/workflows/release.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
name: build (${{ matrix.goos }}-${{ matrix.goarch }})
1414
runs-on: ubuntu-latest
1515
strategy:
16+
fail-fast: false
1617
matrix:
1718
include:
1819
- goos: darwin
@@ -82,10 +83,10 @@ jobs:
8283
run: |
8384
VERSION="${{ github.ref_name }}"
8485
VERSION_NUM="${VERSION#v}"
85-
DARWIN_ARM64_SHA=$(curl -sL "https://github.com/NodeOps-app/createos-cli/releases/download/${VERSION}/createos-darwin-arm64.sha256")
86-
DARWIN_AMD64_SHA=$(curl -sL "https://github.com/NodeOps-app/createos-cli/releases/download/${VERSION}/createos-darwin-amd64.sha256")
87-
LINUX_AMD64_SHA=$(curl -sL "https://github.com/NodeOps-app/createos-cli/releases/download/${VERSION}/createos-linux-amd64.sha256")
88-
LINUX_ARM64_SHA=$(curl -sL "https://github.com/NodeOps-app/createos-cli/releases/download/${VERSION}/createos-linux-arm64.sha256")
86+
DARWIN_ARM64_SHA=$(cat createos-darwin-arm64.sha256)
87+
DARWIN_AMD64_SHA=$(cat createos-darwin-amd64.sha256)
88+
LINUX_AMD64_SHA=$(cat createos-linux-amd64.sha256)
89+
LINUX_ARM64_SHA=$(cat createos-linux-arm64.sha256)
8990
sed -i "s/version \".*\"/version \"${VERSION_NUM}\"/" Formula/createos.rb
9091
sed -i "s|releases/download/v[^/]*/|releases/download/${VERSION}/|g" Formula/createos.rb
9192
sed -i "/darwin-arm64/{n;s/sha256 \".*\"/sha256 \"${DARWIN_ARM64_SHA}\"/}" Formula/createos.rb

.secrets.baseline

Lines changed: 71 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@
9090
{
9191
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
9292
},
93+
{
94+
"path": "detect_secrets.filters.common.is_baseline_file",
95+
"filename": ".secrets.baseline"
96+
},
9397
{
9498
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
9599
"min_level": 2
@@ -129,8 +133,8 @@
129133
"filename": "cmd/env/set.go",
130134
"hashed_secret": "ec417f567082612f8fd6afafe1abcab831fca840",
131135
"is_verified": false,
132-
"is_secret": false,
133-
"line_number": 24
136+
"line_number": 24,
137+
"is_secret": false
134138
}
135139
],
136140
"cmd/oauth/helpers.go": [
@@ -139,20 +143,80 @@
139143
"filename": "cmd/oauth/helpers.go",
140144
"hashed_secret": "a587be0a364eab71821821cfc5226eb04853224f",
141145
"is_verified": false,
142-
"is_secret": false,
143-
"line_number": 155
146+
"line_number": 155,
147+
"is_secret": false
148+
}
149+
],
150+
"cmd/sandbox/mutagen_install.go": [
151+
{
152+
"type": "Hex High Entropy String",
153+
"filename": "cmd/sandbox/mutagen_install.go",
154+
"hashed_secret": "8b5212749c89f1bd1272fc5d9818b7a2637ee9ae",
155+
"is_verified": false,
156+
"line_number": 38
157+
},
158+
{
159+
"type": "Hex High Entropy String",
160+
"filename": "cmd/sandbox/mutagen_install.go",
161+
"hashed_secret": "39f4cd92d9d15d0c63192ab04c4b5c2178e469c3",
162+
"is_verified": false,
163+
"line_number": 39
164+
},
165+
{
166+
"type": "Hex High Entropy String",
167+
"filename": "cmd/sandbox/mutagen_install.go",
168+
"hashed_secret": "b0fc6342e75a770345804efbfb3bffff28ef7d61",
169+
"is_verified": false,
170+
"line_number": 40
171+
},
172+
{
173+
"type": "Hex High Entropy String",
174+
"filename": "cmd/sandbox/mutagen_install.go",
175+
"hashed_secret": "6624e3f1d89dcdce89ecfc0c0e6e6b944e5b762b",
176+
"is_verified": false,
177+
"line_number": 41
178+
},
179+
{
180+
"type": "Hex High Entropy String",
181+
"filename": "cmd/sandbox/mutagen_install.go",
182+
"hashed_secret": "fbaf499047f17177b13cf14847656cfb463bb0ac",
183+
"is_verified": false,
184+
"line_number": 42
185+
},
186+
{
187+
"type": "Hex High Entropy String",
188+
"filename": "cmd/sandbox/mutagen_install.go",
189+
"hashed_secret": "067aa79cb55a0b12c15397282fe6976bade16df8",
190+
"is_verified": false,
191+
"line_number": 43
192+
}
193+
],
194+
"docs/sandbox-e2e-plan.md": [
195+
{
196+
"type": "Secret Keyword",
197+
"filename": "docs/sandbox-e2e-plan.md",
198+
"hashed_secret": "0617f432213525c980d00284c580de1fe59be9d9",
199+
"is_verified": false,
200+
"line_number": 115
144201
}
145202
],
146203
"internal/api/client.go": [
204+
{
205+
"type": "Secret Keyword",
206+
"filename": "internal/api/client.go",
207+
"hashed_secret": "cef935e44721eddde058014759fc1a5d0cbb7f7a",
208+
"is_verified": false,
209+
"line_number": 63
210+
},
147211
{
148212
"type": "Secret Keyword",
149213
"filename": "internal/api/client.go",
150214
"hashed_secret": "b19a5a3616bf8b53864ca6162b5f1f6a8c61ab94",
151215
"is_verified": false,
152-
"is_secret": false,
153-
"line_number": 97
216+
"line_number": 155,
217+
"is_secret": false
154218
}
155219
]
156220
},
157-
"generated_at": "2026-04-02T07:26:00Z"
221+
"generated_at": "2026-06-17T08:48:28Z"
158222
}

0 commit comments

Comments
 (0)