-
-
Notifications
You must be signed in to change notification settings - Fork 37
57 lines (55 loc) · 1.55 KB
/
build.yml
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
name: build
on:
pull_request:
branches-ignore:
- dependabot/*
paths-ignore:
- docs/**
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
mongodb-version: [4]
steps:
steps:
- name: Remove unused Docker images
run: docker system prune -af
- name: Remove temporary files
run: sudo rm -rf /tmp/*
- name: Git checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Download localisations
uses: localazy/download@v1
with:
read_key: ${{ secrets.LOCALAZY_READ_KEY }}
write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}
- name: Install packages and symlink local dependencies
# Can’t use npm ci due to https://github.com/npm/cli/issues/4828
run: |
npm i --package-lock=false
- name: Lint code
run: |
npm run lint
- name: Run tests
env:
NODE_ENV: test
SECRET: ${{ secrets.SECRET }}
run: |
npm test