-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (52 loc) · 1.43 KB
/
main.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
58
59
60
61
name: Gatekeeper
on:
pull_request:
branches:
- main
jobs:
gatekeeper:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: write
checks: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: whatsapp_web_listener/package-lock.json
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::201893381538:role/GitHubRole
role-session-name: GitHubActionsSession
- name: Set up Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry self add 'poethepoet[poetry_plugin]'
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'poetry'
- name: Install dependencies
run: |
poetry install
npm install -g aws-cdk
- name: Install dependencies in whatsapp-web-listener folder
run: |
pushd whatsapp_web_listener
npm install
popd
- name: Run gatekeeper script
run: poetry poe gate_ci
- name: Create coverage report in PR
uses: 5monkeys/cobertura-action@master
with:
minimum_coverage: 75