Skip to content

Commit cd58f96

Browse files
authored
ci(github-actions): minor improvements (#908)
* ci(github-actions): pin streetsidesoftware/cspell-action@v2 * ci(github-actions): add build step * ci(github-actions): add jest ci flag
1 parent b1a1c7e commit cd58f96

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,35 @@ name: CI
33
on: ['push', 'pull_request']
44

55
jobs:
6+
build:
7+
name: Build
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Use Node.js 20.x
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version: 20.x
16+
17+
- uses: actions/cache@v3
18+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
19+
with:
20+
path: '**/node_modules'
21+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
22+
restore-keys: |
23+
${{ runner.os }}-yarn-
24+
25+
- name: yarn install
26+
if: steps.yarn-cache.outputs.cache-hit != 'true' # Over here!
27+
run: yarn install --frozen-lockfile --ignore-scripts
28+
29+
- name: yarn build
30+
run: yarn build
31+
32+
env:
33+
CI: true
34+
635
lint:
736
name: Lint
837
runs-on: ubuntu-latest
@@ -60,7 +89,7 @@ jobs:
6089
run: yarn install --frozen-lockfile --ignore-scripts
6190

6291
- name: yarn test
63-
run: yarn test --reporters="default" --reporters="github-actions"
92+
run: yarn test --ci --reporters="default" --reporters="github-actions"
6493

6594
env:
6695
CI: true
@@ -101,7 +130,7 @@ jobs:
101130
runs-on: ubuntu-latest
102131
steps:
103132
- uses: actions/checkout@v3
104-
- uses: streetsidesoftware/cspell-action@main
133+
- uses: streetsidesoftware/cspell-action@v2
105134
with:
106135
# Github token used to fetch the list of changed files in the commit.
107136
# Default: ${{ github.token }}

0 commit comments

Comments
 (0)