|
| 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 |
0 commit comments