Skip to content

Commit d17f1a8

Browse files
committed
ci: test automation using github workflow textlint_test.yml
1 parent dcd616b commit d17f1a8

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/textlint_test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Textlint Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'textlint/**/*.js'
9+
- '.github/workflows/textlint_test.yml'
10+
11+
pull_request:
12+
types:
13+
- opened
14+
- synchronize
15+
- reopened
16+
paths:
17+
- 'textlint/**/*.js'
18+
- '.github/workflows/textlint_test.yml'
19+
20+
jobs:
21+
Test:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Set up checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Set up node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20.x
32+
cache: yarn
33+
34+
- name: Set up cache
35+
uses: actions/cache@v4
36+
with:
37+
path: ~/.yarn-cache
38+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
39+
40+
- name: Install dependencies
41+
run: yarn install --frozen-lockfile
42+
# The `--frozen-lockfile` flag in Yarn ensures that dependencies are installed without modifying the `yarn.lock` file. It is useful for maintaining consistency in CI/CD environments by preventing unexpected changes to the lock file and ensuring that the same versions of dependencies are installed.
43+
44+
- name: Test
45+
run: yarn textlint-test

0 commit comments

Comments
 (0)