|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read |
| 10 | + |
| 11 | +jobs: |
| 12 | + lockfile: |
| 13 | + name: Lockfile immutability |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 17 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 18 | + with: |
| 19 | + node-version: 24 |
| 20 | + cache: yarn |
| 21 | + - run: yarn install --immutable |
| 22 | + |
| 23 | + dist-clean: |
| 24 | + name: No committed dist |
| 25 | + runs-on: ubuntu-latest |
| 26 | + steps: |
| 27 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 28 | + - name: Verify dist is not tracked in git |
| 29 | + run: | |
| 30 | + tracked=$(git ls-files dist/) |
| 31 | + if [ -n "$tracked" ]; then |
| 32 | + echo "ERROR: dist/ files are committed to git:" |
| 33 | + echo "$tracked" |
| 34 | + echo "Fix: git rm -r --cached dist/" |
| 35 | + exit 1 |
| 36 | + fi |
| 37 | + echo "OK: dist/ is not tracked" |
| 38 | +
|
| 39 | + format: |
| 40 | + name: Format |
| 41 | + runs-on: ubuntu-latest |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 44 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 45 | + with: |
| 46 | + node-version: 24 |
| 47 | + cache: yarn |
| 48 | + - run: yarn install --immutable |
| 49 | + - run: yarn format:check |
| 50 | + |
| 51 | + lint: |
| 52 | + name: Lint |
| 53 | + runs-on: ubuntu-latest |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 56 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 57 | + with: |
| 58 | + node-version: 24 |
| 59 | + cache: yarn |
| 60 | + - run: yarn install --immutable |
| 61 | + - run: yarn lint |
| 62 | + |
| 63 | + imports: |
| 64 | + name: Import check (adio) |
| 65 | + runs-on: ubuntu-latest |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 68 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 69 | + with: |
| 70 | + node-version: 24 |
| 71 | + cache: yarn |
| 72 | + - run: yarn install --immutable |
| 73 | + - run: yarn check:imports |
| 74 | + |
| 75 | + typecheck: |
| 76 | + name: Typecheck |
| 77 | + runs-on: ubuntu-latest |
| 78 | + steps: |
| 79 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 80 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 81 | + with: |
| 82 | + node-version: 24 |
| 83 | + cache: yarn |
| 84 | + - run: yarn install --immutable |
| 85 | + - run: yarn typecheck |
| 86 | + |
| 87 | + build: |
| 88 | + name: Build |
| 89 | + needs: [lockfile, format, lint, imports, typecheck] |
| 90 | + runs-on: ubuntu-latest |
| 91 | + steps: |
| 92 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 93 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 94 | + with: |
| 95 | + node-version: 24 |
| 96 | + cache: yarn |
| 97 | + - run: yarn install --immutable |
| 98 | + - run: yarn build |
| 99 | + |
| 100 | + test: |
| 101 | + name: Test & Coverage |
| 102 | + needs: [build] |
| 103 | + runs-on: ubuntu-latest |
| 104 | + steps: |
| 105 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 106 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 107 | + with: |
| 108 | + node-version: 24 |
| 109 | + cache: yarn |
| 110 | + - run: yarn install --immutable |
| 111 | + - run: yarn test:coverage |
| 112 | + |
| 113 | + pack: |
| 114 | + name: Pack dry-run |
| 115 | + needs: [build] |
| 116 | + runs-on: ubuntu-latest |
| 117 | + steps: |
| 118 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 119 | + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 120 | + with: |
| 121 | + node-version: 24 |
| 122 | + cache: yarn |
| 123 | + - run: yarn install --immutable |
| 124 | + - run: yarn build |
| 125 | + - run: yarn pack:packages |
0 commit comments