Skip to content

Commit b1cd013

Browse files
committed
:tada
0 parents  commit b1cd013

101 files changed

Lines changed: 7424 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
time: "09:00"
9+
open-pull-requests-limit: 5
10+
groups:
11+
dependencies:
12+
patterns:
13+
- "*"
14+
exclude-patterns:
15+
- "@r5n/*"
16+
commit-message:
17+
prefix: "chore"
18+
include: "scope"
19+
labels:
20+
- "dependencies"
21+
- "automated"
22+
reviewers:
23+
- "ice-chillios"
24+
25+
- package-ecosystem: "github-actions"
26+
directory: "/"
27+
schedule:
28+
interval: "weekly"
29+
commit-message:
30+
prefix: "ci"
31+
labels:
32+
- "ci"
33+
- "automated"

.github/workflows/ci.yml

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
ref: ${{ github.head_ref }}
18+
19+
- name: Configure and checkout submodules
20+
run: |
21+
git config --global url."https://github.com/".insteadOf "git@github.com:"
22+
git submodule update --init --recursive
23+
24+
- uses: oven-sh/setup-bun@v2
25+
with:
26+
bun-version: latest
27+
28+
- name: Install dependencies
29+
run: bun install --frozen-lockfile
30+
31+
- name: Run linter
32+
run: bun lint
33+
34+
typecheck:
35+
name: Type Check
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 0
41+
ref: ${{ github.head_ref }}
42+
43+
- name: Configure and checkout submodules
44+
run: |
45+
git config --global url."https://github.com/".insteadOf "git@github.com:"
46+
git submodule update --init --recursive
47+
48+
- uses: oven-sh/setup-bun@v2
49+
with:
50+
bun-version: latest
51+
52+
- name: Install dependencies
53+
run: bun install --frozen-lockfile
54+
55+
- name: Run type check
56+
run: bun type-check:ci
57+
58+
test:
59+
name: Test
60+
runs-on: ${{ matrix.os }}
61+
strategy:
62+
matrix:
63+
os: [ubuntu-latest, macos-latest]
64+
bun-version: [latest]
65+
steps:
66+
- uses: actions/checkout@v4
67+
with:
68+
fetch-depth: 0
69+
ref: ${{ github.head_ref }}
70+
71+
- name: Configure and checkout submodules
72+
run: |
73+
git config --global url."https://github.com/".insteadOf "git@github.com:"
74+
git submodule update --init --recursive
75+
76+
- uses: oven-sh/setup-bun@v2
77+
with:
78+
bun-version: ${{ matrix.bun-version }}
79+
80+
- name: Install dependencies
81+
run: bun install --frozen-lockfile
82+
83+
- name: Run tests
84+
run: bun test --pass-with-no-tests
85+
86+
build:
87+
name: Build
88+
runs-on: ${{ matrix.os }}
89+
strategy:
90+
matrix:
91+
os: [ubuntu-latest, macos-latest]
92+
steps:
93+
- uses: actions/checkout@v4
94+
with:
95+
fetch-depth: 0
96+
ref: ${{ github.head_ref }}
97+
98+
- name: Configure and checkout submodules
99+
run: |
100+
git config --global url."https://github.com/".insteadOf "git@github.com:"
101+
git submodule update --init --recursive
102+
103+
- uses: oven-sh/setup-bun@v2
104+
with:
105+
bun-version: latest
106+
107+
- name: Install dependencies
108+
run: bun install --frozen-lockfile
109+
110+
- name: Build all packages
111+
run: bun run build
112+
113+
- name: Verify CLI executables
114+
run: |
115+
# Verify Hydra
116+
./packages/hydra/dist/cli.js --version
117+
118+
# Verify Sisyphus
119+
./packages/sisyphus/dist/cli.js --version
120+
121+
# # Verify Atlas
122+
# ./packages/atlas/dist/cli.js --version
123+
124+
integration:
125+
name: Integration Tests
126+
needs: build
127+
runs-on: ${{ matrix.os }}
128+
strategy:
129+
matrix:
130+
os: [ubuntu-latest, macos-latest]
131+
steps:
132+
- uses: actions/checkout@v4
133+
with:
134+
fetch-depth: 0
135+
ref: ${{ github.head_ref }}
136+
137+
- name: Configure and checkout submodules
138+
run: |
139+
git config --global url."https://github.com/".insteadOf "git@github.com:"
140+
git submodule update --init --recursive
141+
142+
- uses: oven-sh/setup-bun@v2
143+
with:
144+
bun-version: latest
145+
146+
- name: Install dependencies
147+
run: bun install --frozen-lockfile
148+
149+
- name: Build all packages
150+
run: bun run build
151+
152+
- name: Test Hydra CLI
153+
run: |
154+
chmod +x packages/hydra/dist/cli.js
155+
./packages/hydra/dist/cli.js help
156+
./packages/hydra/dist/cli.js --version
157+
158+
- name: Test Sisyphus CLI
159+
run: |
160+
chmod +x packages/sisyphus/dist/cli.js
161+
./packages/sisyphus/dist/cli.js
162+
./packages/sisyphus/dist/cli.js --version
163+
164+
# - name: Test Atlas CLI
165+
# run: |
166+
# chmod +x packages/atlas/dist/cli.js
167+
# ./packages/atlas/dist/cli.js help
168+
# ./packages/atlas/dist/cli.js doctor
169+
170+
release-check:
171+
name: Release Check
172+
if: github.event_name == 'pull_request'
173+
runs-on: ubuntu-latest
174+
steps:
175+
- uses: actions/checkout@v4
176+
with:
177+
fetch-depth: 0
178+
ref: ${{ github.head_ref }}
179+
180+
- name: Configure and checkout submodules
181+
run: |
182+
git config --global url."https://github.com/".insteadOf "git@github.com:"
183+
git submodule update --init --recursive
184+
185+
- uses: oven-sh/setup-bun@v2
186+
with:
187+
bun-version: latest
188+
189+
- name: Install dependencies
190+
run: bun install --frozen-lockfile
191+
192+
- name: Check for pending releases
193+
run: bun release:check

.github/workflows/release.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
7+
permissions:
8+
contents: write
9+
packages: write
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
if: "!contains(github.event.head_commit.message, 'release(🎉):')"
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
ref: ${{ github.head_ref }}
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: Configure and checkout submodules
25+
run: |
26+
# Convert SSH URLs to HTTPS for GitHub Actions
27+
git config --global url."https://github.com/".insteadOf "git@github.com:"
28+
git submodule update --init --recursive
29+
30+
- uses: ./tools/github/setup
31+
with:
32+
bun: true
33+
34+
- name: Build
35+
run: bun run build
36+
37+
- name: Check for pending stones
38+
id: check-stones
39+
run: |
40+
# Run Sisyphus check and capture output
41+
STONES_JSON=$(bun --bun packages/sisyphus/src/cli.ts check --json 2>&1 || echo '{"error": true, "stones": []}')
42+
43+
# Check if we got valid JSON
44+
if ! echo "$STONES_JSON" | jq . >/dev/null 2>&1; then
45+
echo "ERROR: Invalid JSON output from Sisyphus check"
46+
echo "Raw output: $CHECK_OUTPUT"
47+
exit 1
48+
fi
49+
50+
STONES_COUNT=$(echo "$STONES_JSON" | jq '.stones | length // 0')
51+
52+
if [[ $STONES_JSON == *'"error": true'* ]]; then
53+
echo "WARNING: Error occurred while checking stones. Running with debug output:"
54+
bun --bun packages/sisyphus/src/cli.ts check --debug
55+
exit 1
56+
fi
57+
58+
echo "Found $STONES_COUNT pending stones"
59+
echo "STONES_COUNT=$STONES_COUNT" >> $GITHUB_ENV
60+
61+
- name: Roll release
62+
if: env.STONES_COUNT != '0'
63+
run: |
64+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
65+
bun release:roll
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
NODE_ENV: production
69+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
70+

0 commit comments

Comments
 (0)