-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.36 KB
/
checks.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
name: Pre-merge checks
on:
pull_request:
types:
- opened
- reopened
- ready_for_review
- synchronize
push:
branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Pre-commit github action
uses: pre-commit/[email protected]
with:
extra_args: "detect-secrets --all-files"
- name: SAM Validate
run: sam validate --region eu-west-2 -t deploy/template.yaml --lint
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- name: Install dependencies
run: yarn install
- name: Run lint
run: yarn lint
- name: Run test and write coverage
run: yarn test:coverage
- name: Run browser tests
run: yarn run test:browser:ci
- name: Run sonarcloud scan
if: ${{ github.actor != 'dependabot[bot]' }}
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}