-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (45 loc) · 1.31 KB
/
tests.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: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'latest'
- run: npm ci
- name: ESLint
run: npm run lint
sonarcloud:
name: Unit+Integration & SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Start LocalStack
uses: LocalStack/[email protected]
# https://docs.aws.amazon.com/cli/latest/reference/dynamodb/create-table.html
- name: Create DynamoDB table
run: |-
awslocal dynamodb create-table --region eu-west-2 --cli-input-json file://scripts/local-test-db-scheme.json
awslocal s3 mb s3://test-bucket
- uses: actions/setup-node@v4
with:
node-version: 'latest'
- run: npm ci
- name: Run unit tests
run: npm run test:coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}