mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-14 00:07:00 +01:00
56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm run lint
|
|
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node: [22, 24]
|
|
services:
|
|
mongodb:
|
|
image: mongo:7
|
|
ports:
|
|
- 27017:27017
|
|
options: >-
|
|
--health-cmd "mongosh --quiet --eval 'db.adminCommand({ping:1})'"
|
|
--health-interval 10s --health-timeout 5s --health-retries 10
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- 6379:6379
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 5s --health-timeout 3s --health-retries 10
|
|
env:
|
|
TEST_MONGODB_URI: mongodb://127.0.0.1:27017/dependency_test
|
|
PERFORMANCE_MONGO_URI: mongodb://127.0.0.1:27017/perf_test_ci
|
|
PERFORMANCE_REDIS_PORT: 6379
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: npm audit --audit-level=low
|
|
- run: npm test
|