-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (44 loc) · 1.36 KB
/
cicd.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
name: ci-cd
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
python --version
python -m pip install --upgrade pip
pip install -r requirements.txt
# - name: Commit Lint
# run: |
# pip install gitlint==0.18.0
# gitlint --contrib CT1 --ignore B6 -c ignore-by-author-name.regex=github-actions -c general.ignore-merge-commits=true
- name: Lint with pylint
run: |
pip install pylint
pylint --rcfile=.pylintrc decide/*.py
- name: Test with pytest
run: |
pytest -vv decide/test --disable-pytest-warnings
cd:
needs: ci
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.FEB_2024_SECRET }}
- name: Use Python Semantic Release to prepare Release
uses: relekang/python-semantic-release@master
with:
github_token: ${{ secrets.FEB_2024_SECRET }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_API_TOKEN }}