Skip to content

Commit

Permalink
lint and test
Browse files Browse the repository at this point in the history
  • Loading branch information
momentiris committed May 21, 2024
1 parent 194bc53 commit 6a24f19
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint and Test

on:
push:
branches: [main]
pull_request:

jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/node-and-npm
- name: Run tests
run: |
export NODE_OPTIONS="--max_old_space_size=4096"
LOG_LEVEL=error npm test
- name: Lint
run: npm run lint

18 changes: 18 additions & 0 deletions .github/workflows/node-and-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Node
description: Reusable action to get the correct node version installed in CI
runs:
using: composite
steps:
- uses: actions/setup-node@v4
with:
node-version: 18.15
- name: cache node_modules
uses: actions/cache@v4
with:
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
path: |
node_modules
- name: install npm & node dependencies
shell: bash
run: npm i -g [email protected] && npm i

0 comments on commit 6a24f19

Please sign in to comment.