Skip to content

Commit

Permalink
add github workflow lint-and-test action
Browse files Browse the repository at this point in the history
  • Loading branch information
stepanjakl committed May 10, 2024
1 parent 8760400 commit d24fa5d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: lint-and-test
run-name: lint and test

on:
push:
branches: ["main"]
pull_request:
branches: ["*"]

jobs:
lint-and-test:
name: Lint and Test
runs-on: ubuntu-latest

steps:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Dependencies
run: npm install

- name: Run ESLint
run: npm run eslint

- name: Run Mocha Tests
run: npm run mocha
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
<img alt="License"
src="https://img.shields.io/static/v1?style=for-the-badge&labelColor=000000&label=License&message=MIT&color=3DA639">
</a>
<br>
<br>
<a aria-label="Unit Tests"
href="https://github.com/stepanjakl/apostrophe-stripe-products/actions/workflows/tests.yml">
<img alt="Unit Tests"
src="https://github.com/stepanjakl/apostrophe-stripe-products/actions/workflows/tests.yml/badge.svg?branch=main)">
</a>
</p>
</div>

Expand Down

0 comments on commit d24fa5d

Please sign in to comment.