Skip to content

Commit

Permalink
Set up GitHub Actions for jest (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTallJerry authored Jan 10, 2024
1 parent 837bf0c commit 6107198
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Memory Models Tests
on:
pull_request:
push:
branches:
- main

jobs:
jest:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up node and cache packages
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install npm packages
run: npm ci
- name: Build
run: npm run build-dev
- name: Run jest tests
run: npm run test-cov
- name: Coveralls (jest)
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Library for creating Python memory model diagrams that look hand-drawn.",
"main": "dist/memory_models_rough.js",
"scripts": {
"test": "jest",
"test": "jest --no-cache",
"test-cov": "jest --no-cache --collect-coverage",
"watch": "webpack --watch",
"build-dev": "tsc && webpack",
"build": "tsc && webpack --mode production",
Expand Down

0 comments on commit 6107198

Please sign in to comment.