-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.01 KB
/
cd.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
name: Continuous Deployment
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
deploy:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4 # Corrected indentation here
with:
python-version: '3.11'
- name: Install dependencies from requirements.txt
run: |
if [ -f requirements.txt ]; then
python -m pip install --upgrade pip
pip install -r requirements.txt
fi
- name: Install pipenv and dependencies
run: |
python -m pip install --upgrade pip pipenv
if [ -f Pipfile ]; then
pipenv install --dev --skip-lock
fi
- name: Run Unit tests
run: |
if [ -f Pipfile ]; then
pipenv run pytest
fi
working-directory: tests/unit-test
- name: Lint
run: |
if [ -f Pipfile ]; then
pipenv run pylint --recursive=y src
fi
working-directory: .