generated from cds-snc/project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (48 loc) · 1.67 KB
/
ci_code.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
name: Lint, format and test code
on:
workflow_dispatch:
pull_request:
paths:
- app/**
- .github/workflows/ci_code.yml
env:
TERRAGRUNT_VERSION: v0.31.1
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Audit DNS requests
uses: cds-snc/dns-proxy-action@main
env:
DNS_PROXY_FORWARDTOSENTINEL: "true"
DNS_PROXY_LOGANALYTICSWORKSPACEID: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }}
DNS_PROXY_LOGANALYTICSSHAREDKEY: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }}
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Setup python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: "3.10"
- name: Install dev dependencies
working-directory: ./app
run: make install-dev
- name: Install dependencies
working-directory: ./app
run: make install
- name: Lint
working-directory: ./app
run: make lint-ci
- name: Format
working-directory: ./app
run: make fmt-ci
- name: Test
working-directory: ./app
run: make test
env:
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
SESSION_SECRET_KEY: ${{ secrets.SESSION_SECRET_KEY }}
NOTIFY_TEST_KEY: ${{ secrets.NOTIFY_TEST_KEY }}
NOTIFY_SRE_USER_NAME: ${{ secrets.NOTIFY_SRE_USER_NAME }}
NOTIFY_SRE_CLIENT_SECRET: ${{ secrets.NOTIFY_SRE_CLIENT_SECRET }}
NOTIFY_OPS_CHANNEL_ID: ${{ secrets.NOTIFY_OPS_CHANNEL_ID }}