|
8 | 8 |
|
9 | 9 | permissions: |
10 | 10 | contents: read |
11 | | - actions: write # workspace-dist artifact(tar 1 本で packages/*/dist の階層を保持) |
| 11 | + actions: read |
12 | 12 | pull-requests: write |
13 | 13 |
|
14 | 14 | jobs: |
15 | | - lint: |
| 15 | + ci: |
16 | 16 | runs-on: ubuntu-latest |
17 | 17 | steps: |
18 | | - - &checkout |
19 | | - uses: actions/checkout@v6 |
| 18 | + - uses: actions/checkout@v6 |
20 | 19 |
|
21 | | - - &setup-bun |
22 | | - uses: oven-sh/setup-bun@v2 |
| 20 | + - uses: oven-sh/setup-bun@v2 |
23 | 21 | with: |
24 | 22 | bun-version: 1.2.17 |
25 | 23 |
|
26 | | - - &cache |
27 | | - name: cache |
| 24 | + - name: cache |
28 | 25 | uses: actions/cache@v5 |
29 | 26 | with: |
30 | 27 | path: ~/.bun/install/cache |
31 | 28 | key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} |
32 | 29 | restore-keys: | |
33 | 30 | bun-${{ runner.os }}- |
34 | 31 |
|
35 | | - - &install |
36 | | - name: Install dependencies |
| 32 | + - name: Install dependencies |
37 | 33 | run: bun install --frozen-lockfile |
38 | 34 |
|
39 | 35 | - name: Lint |
40 | 36 | run: bun run lint |
41 | 37 |
|
42 | | - build: |
43 | | - runs-on: ubuntu-latest |
44 | | - steps: |
45 | | - - *checkout |
46 | | - - *setup-bun |
47 | | - - *cache |
48 | | - - *install |
49 | | - |
50 | 38 | - name: Build |
51 | 39 | run: bun run build |
52 | 40 |
|
53 | 41 | - name: Type check |
54 | 42 | run: bun run typecheck |
55 | 43 |
|
56 | | - - name: Pack workspace dist |
57 | | - run: | |
58 | | - find packages -maxdepth 2 -type d -name dist -print | LC_ALL=C sort > dist-list.txt |
59 | | - test -s dist-list.txt |
60 | | - tar czf workspace-dist.tar.gz -T dist-list.txt |
| 44 | + - name: Test with coverage (@vimee/core) |
| 45 | + run: bun run --filter @vimee/core test:coverage |
61 | 46 |
|
62 | | - - name: Upload workspace dist |
63 | | - uses: actions/upload-artifact@v4 |
| 47 | + - uses: k1LoW/octocov-action@v1 |
64 | 48 | with: |
65 | | - name: workspace-dist |
66 | | - path: workspace-dist.tar.gz |
| 49 | + config: packages/core/.octocov.yml |
67 | 50 |
|
68 | | - test-coverage: |
69 | | - name: test-coverage (${{ matrix.package }}) |
70 | | - needs: build |
71 | | - runs-on: ubuntu-latest |
72 | | - strategy: |
73 | | - fail-fast: false |
74 | | - matrix: |
75 | | - include: |
76 | | - - package: '@vimee/core' |
77 | | - octocov: packages/core/.octocov.yml |
78 | | - - package: '@vimee/react' |
79 | | - octocov: packages/react/.octocov.yml |
80 | | - - package: '@vimee/plugin-textarea' |
81 | | - octocov: packages/plugin-textarea/.octocov.yml |
82 | | - - package: '@vimee/shiki-editor' |
83 | | - octocov: packages/shiki-editor/.octocov.yml |
84 | | - steps: |
85 | | - - *checkout |
86 | | - - *setup-bun |
87 | | - - *cache |
88 | | - - *install |
| 51 | + - name: Test with coverage (@vimee/react) |
| 52 | + run: bun run --filter @vimee/react test:coverage |
89 | 53 |
|
90 | | - - name: Download workspace dist |
91 | | - uses: actions/download-artifact@v4 |
| 54 | + - uses: k1LoW/octocov-action@v1 |
92 | 55 | with: |
93 | | - name: workspace-dist |
94 | | - path: . |
| 56 | + config: packages/react/.octocov.yml |
| 57 | + |
| 58 | + - name: Test with coverage (@vimee/plugin-textarea) |
| 59 | + run: bun run --filter @vimee/plugin-textarea test:coverage |
95 | 60 |
|
96 | | - - name: Unpack workspace dist |
97 | | - run: tar xzf workspace-dist.tar.gz |
| 61 | + - uses: k1LoW/octocov-action@v1 |
| 62 | + with: |
| 63 | + config: packages/plugin-textarea/.octocov.yml |
98 | 64 |
|
99 | | - - name: Test with coverage |
100 | | - run: bun run --filter ${{ matrix.package }} test:coverage |
101 | | - working-directory: . |
| 65 | + - name: Test with coverage (@vimee/shiki-editor) |
| 66 | + run: bun run --filter @vimee/shiki-editor test:coverage |
102 | 67 |
|
103 | 68 | - uses: k1LoW/octocov-action@v1 |
104 | 69 | with: |
105 | | - config: ${{ matrix.octocov }} |
| 70 | + config: packages/shiki-editor/.octocov.yml |
0 commit comments