-
-
Notifications
You must be signed in to change notification settings - Fork 8
71 lines (54 loc) · 1.69 KB
/
main.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
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Purlovia on-push Actions
on: [push]
env:
PIPENV_NOSPIN: 1
jobs:
check:
strategy:
matrix:
python_version: ['3.10']
os: [ubuntu-latest]
name: Lint and test using Python ${{ matrix.python_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout files from Git
uses: actions/checkout@v3
with:
fetch-depth: 1
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
cache: 'pipenv'
- name: Install pipenv
run: python -m pip install pipenv
- name: Create virtualenv and install deps
run: pipenv install --dev --deploy --python ${{ matrix.python_version }}
- name: Check for vulnerable deps
run: pipenv run check
env:
PIPENV_PYUP_API_KEY: ""
# - name: Format check - isort
# run: pipenv run isort > /dev/null
- name: Format check - yapf
run: pipenv run yapf > /dev/null
- name: Lint check - flake8
run: pipenv run flake
- name: Type check - mypy
run: pipenv run mypy
- name: Run tests
run: pipenv run tests-nogame
# - name: Save test results
# - name: Save code coverage
- name: Publishing live Docker image
if: github.event_name == 'push' && github.ref == 'refs/heads/live'
uses: elgohr/Publish-Docker-Github-Action@v5
env:
COMMIT: ${{ github.sha }}
BRANCH: ${{ github.repository }}@${{ github.ref_name }}
with:
name: coldino/purlovia:live
buildargs: COMMIT,BRANCH
username: ${{ secrets.DCKR_USR }}
password: ${{ secrets.DCKR_PSSW }}