Skip to content

Commit

Permalink
ci: configure moon
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Correa Casablanca <[email protected]>
  • Loading branch information
castarco committed Mar 28, 2024
1 parent 8da7ac1 commit 103a0d1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,5 @@ jobs:

- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Linters
working-directory: ./@kindspells/astro-shield
run: pnpm lint
- name: Run Unit Tests
working-directory: ./@kindspells/astro-shield
run: pnpm test:unit:cov
# Disabled until we discover how to run "network-related" tests in CI
# - name: Run End-to-End Tests
# run: pnpm test:e2e:coverage
- name: Run Moon CI checks
run: pnpm moon ci
3 changes: 1 addition & 2 deletions .hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
set -eu
set -o pipefail

pnpm moon :lint
pnpm moon :test.unit.cov
pnpm moon ci
3 changes: 3 additions & 0 deletions .moon/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ projects:
- '@kindspells/astro-shield/e2e/fixtures/*'
sources:
astro-shield: '@kindspells/astro-shield'

vcs:
defaultBranch: 'main'
8 changes: 6 additions & 2 deletions @kindspells/astro-shield/moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,22 @@ tasks:
- 'e2e/**/*.mts'
test.e2e:
command: 'vitest -c vitest.config.e2e.mts run'
local: true
inputs:
- 'vitest.config.e2e.mts'
- 'src/**/*'
- 'e2e/**/*'
local: true
options:
runInCI: false
test.unit:
command: 'vitest -c vitest.config.unit.mts run'
local: true
inputs:
- 'vitest.config.unit.mts'
- 'src/**/*'
- 'tests/**/*'
local: true
options:
runInCI: false
test.unit.cov:
command: 'vitest -c vitest.config.unit.mts run --coverage'
inputs:
Expand Down
2 changes: 1 addition & 1 deletion @kindspells/astro-shield/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:biome": "moon run lint.biome",
"lint:publint": "moon run lint.publint",
"lint:tsc": "moon run lint.tsc",
"prepublishOnly": "pnpm lint && pnpm test:unit",
"prepublishOnly": "pnpm lint && pnpm test:unit:cov",
"test:e2e": "moon run test.e2e",
"test:unit": "moon run test.unit",
"test:unit:cov": "moon run test.unit.cov"
Expand Down

0 comments on commit 103a0d1

Please sign in to comment.