Skip to content

Commit

Permalink
ci: add an action for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mr150 committed Jun 11, 2024
1 parent 1597233 commit 7da5208
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test

on:
pull_request:
paths:
- 'packages'
- 'test'
- '.github/workflows/test.yml'

jobs:
test:
name: Check that packages compiles, lint and tests pass
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build:packages
- name: Lint
run: npm run lint
- name: Test
run: npm test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
],
"scripts": {
"dev": "npx gulp -f gulpfile.cjs",
"build:all": "export NODE_ENV=production && npm run build --workspace=@mlut/core && npm run build --workspace=mlut && npx gulp -f gulpfile.cjs build",
"build:packages": "npm run build --workspace=@mlut/core && npm run build --workspace=mlut && npx gulp -f gulpfile.cjs sass",
"build:docs": "npx gulp -f gulpfile.cjs sass-mk-doc",
"build:mlut": "npm run build --workspace=mlut && npx gulp -f gulpfile.cjs sass",
"build:core": "npm run build --workspace=@mlut/core",
"lint": "npx eslint packages/*/src/ && npx stylelint packages/*/src --ip packages/core/src/sass/tools/mixins/base/_mk-ar.scss",
Expand Down

0 comments on commit 7da5208

Please sign in to comment.