This repository was archived by the owner on Dec 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (46 loc) · 1.61 KB
/
production.yml
File metadata and controls
49 lines (46 loc) · 1.61 KB
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
name: Production Workflow
on:
push:
branches:
- Production
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .git,__pycache__,docs/source/conf.py,old,build,dist
# exit-zero treats all errors as warnings
flake8 . --count --max-line-length=80 --statistics --exclude .git,__pycache__,docs/source/conf.py,old,build,dist
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install pyright
run: npm install pyright -g
- name: Run pyright
run: pyright dathost/*
- name: Run unit tests
env:
EMAIL: ${{ secrets.EMAIL }}
PASSWORD: ${{ secrets.PASSWORD }}
run: python run_tests.py --email $EMAIL --pw $PASSWORD
- name: Pack to pypi
env:
PYPI_USER: ${{ secrets.PYPI_USER }}
PYPI_PASS: ${{ secrets.PYPI_PASS }}
run: |
python -m pip install --upgrade build
python -m pip install --user --upgrade twine
python -m build
python -m twine upload --username $PYPI_USER --password $PYPI_PASS --repository pypi dist/*