Skip to content

Commit

Permalink
Add CI step
Browse files Browse the repository at this point in the history
  • Loading branch information
hmallen99 committed May 6, 2024
1 parent ab14a46 commit eb7856e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run Nx Module Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test-and-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Install dependencies
run: npm ci

- name: Validate Build
run: npm run build

- name: Check Format
run: npm run format:check

- name: Check Lint
run: npm run lint

- name: Run Tests
run: npm test
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"main": "index.js",
"scripts": {
"test": "jest",
"build": "npx swc src -d dist --ignore **/*.spec.ts"
"build": "npx swc src -d dist --ignore **/*.spec.ts",
"lint": "npx eslint src/*.ts",
"format:check": "npx prettier --check src/*.ts"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit eb7856e

Please sign in to comment.