-
-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (51 loc) · 1.34 KB
/
CI.yml
File metadata and controls
62 lines (51 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CI
on:
push:
branches: [master, main]
paths-ignore:
- '**/*.md'
- 'documentation/**'
- '.claude/**'
pull_request:
branches: [master, main]
paths-ignore:
- '**/*.md'
- 'documentation/**'
- '.claude/**'
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ vars.RUNNER || 'ubuntu-latest' }}
timeout-minutes: 30
services:
mongo:
image: mongo:7
ports:
- 27017:27017
options: >-
--health-cmd="mongosh --quiet --eval 'db.runCommand({ ping: 1 })'"
--health-interval=10s
--health-timeout=5s
--health-retries=10
env:
NODE_ENV: ${{ vars.APP_ENV || 'test' }}
DEVKIT_NODE_db_uri: ${{ secrets.MONGO_URI || vars.MONGO_URI || 'mongodb://localhost:27017/NodeTest' }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run test:coverage
- uses: codecov/codecov-action@v5
if: env.CODECOV_TOKEN != ''
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}