-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.18 KB
/
Copy pathci.yml
File metadata and controls
39 lines (35 loc) · 1.18 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
name: CI
on:
push:
branches: [main, develop, 'release/**', 'feature/**', 'hotfix/**']
pull_request:
branches: [main, develop]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Security audit
run: docker run --rm -v "$(pwd)":/app:ro -w /app node:22-alpine npm audit
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22]
steps:
- uses: actions/checkout@v4
- name: Build test container
run: docker compose -f docker-compose.test.yml build --build-arg NODE_VERSION=${{ matrix.node-version }}
- name: Run unit tests
run: docker compose -f docker-compose.test.yml run --rm test-unit
integration-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build test container
run: docker compose -f docker-compose.test.yml build
- name: Run integration tests
run: docker compose -f docker-compose.test.yml up --abort-on-container-exit --exit-code-from test-integration test-integration
- name: Cleanup
if: always()
run: docker compose -f docker-compose.test.yml down -v