Skip to content

Commit

Permalink
ci(github-actions): minor improvements (#908)
Browse files Browse the repository at this point in the history
* ci(github-actions): pin streetsidesoftware/cspell-action@v2
* ci(github-actions): add build step
* ci(github-actions): add jest ci flag
  • Loading branch information
chimurai committed Apr 30, 2023
1 parent b1a1c7e commit cd58f96
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -3,6 +3,35 @@ name: CI
on: ['push', 'pull_request']

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install
if: steps.yarn-cache.outputs.cache-hit != 'true' # Over here!
run: yarn install --frozen-lockfile --ignore-scripts

- name: yarn build
run: yarn build

env:
CI: true

lint:
name: Lint
runs-on: ubuntu-latest
Expand Down Expand Up @@ -60,7 +89,7 @@ jobs:
run: yarn install --frozen-lockfile --ignore-scripts

- name: yarn test
run: yarn test --reporters="default" --reporters="github-actions"
run: yarn test --ci --reporters="default" --reporters="github-actions"

env:
CI: true
Expand Down Expand Up @@ -101,7 +130,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: streetsidesoftware/cspell-action@main
- uses: streetsidesoftware/cspell-action@v2
with:
# Github token used to fetch the list of changed files in the commit.
# Default: ${{ github.token }}
Expand Down

0 comments on commit cd58f96

Please sign in to comment.