-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (92 loc) · 2.48 KB
/
app.yaml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Python Checks
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
tags:
- 'v*'
jobs:
lints_pipeline:
name: Lints CI Pipeline
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.11']
env:
ENV: CI
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Install dependencies
run: |
make install PYTHON=python
- name: Lint Code (use uppercase TODO, XXX, FIXME, NOTE and explain nopep8)
run: |
make lint-comment
- name: Lint Code (use empty main inits)
run: |
make lint-emptyinit
- name: Lint Code (sort requirements)
run: |
make lint-requirements
- name: Lint Code (requirements complete)
run: |
make requirements-complete
- name: Lint Code (use f"" style formating)
run: |
make lint-stringformat
- name: Lint Code (indent in fours)
run: |
make lint-indent
- name: Lint Code (no f"a", "{a}", or f'{a}')
run: |
make lint-forgottenformat PYTHON=python
- name: Only pyi in stubs
run: |
make lint-pyi
- name: Lint Code (missing trailing comma)
run: |
make lint-flake8
- name: Lint Code (pycodestyle)
run: |
make lint-pycodestyle
- name: Lint Code (type-check)
run: |
make lint-type-check
- name: Lint Code (pylint)
run: |
make lint-pylint
deploy_pipeline:
name: Deploy
needs: lints_pipeline # , tests_pipeline
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker login
uses: azure/docker-login@v1
with:
login-server: acclabdocker.azurecr.io
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Set env
run: echo "IMAGE_TAG=$(make -s name)" >> $GITHUB_ENV
- name: Build docker image
run: |
make -s build
env:
CONFIG_PATH: "-"
- name: Push docker image
run: |
make -s dockerpush
- uses: azure/webapps-deploy@v2
with:
app-name: 'nlpapi'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: 'acclabdocker.azurecr.io/smartsearch:${{ env.IMAGE_TAG }}'