Skip to content

Commit 25a2166

Browse files
committed
ci: merge lint and test workflows and reuse build
1 parent 5a3d2a6 commit 25a2166

File tree

2 files changed

+35
-44
lines changed

2 files changed

+35
-44
lines changed

.github/workflows/lint.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test
1+
name: Lint & Test
22
on:
33
push:
44
branches-ignore:
@@ -48,6 +48,40 @@ jobs:
4848
path: packages/*/lib
4949
key: build-intlify-bundle-tools-os-${{ matrix.os }}-${{ github.sha }}
5050

51+
lint:
52+
name: 'Lint on Node.js ${{ matrix.node }} OS: ${{matrix.os}}'
53+
runs-on: ${{ matrix.os }}
54+
needs:
55+
- build
56+
strategy:
57+
matrix:
58+
os: [ubuntu-latest]
59+
node: [18]
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
64+
- name: Install pnpm
65+
uses: pnpm/action-setup@v4
66+
67+
- name: Setup Node.js ${{ matrix.node }}
68+
uses: actions/setup-node@v4
69+
with:
70+
node-version: ${{ matrix.node }}
71+
cache: 'pnpm'
72+
73+
- name: Install dependencies
74+
run: pnpm install
75+
76+
- name: Restore dist cache
77+
uses: actions/cache@v4
78+
with:
79+
path: packages/*/lib
80+
key: build-intlify-bundle-tools-os-${{ matrix.os }}-${{ github.sha }}
81+
82+
- name: Linting
83+
run: pnpm lint
84+
5185
test:
5286
name: 'Test on Node.js ${{ matrix.node }} OS: ${{matrix.os}} (${{ matrix.framework }})'
5387
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)