-
Notifications
You must be signed in to change notification settings - Fork 183
62 lines (60 loc) · 1.88 KB
/
build.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
name: build
on:
push:
branches-ignore:
- deploy
pull_request:
branches-ignore:
- deploy
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.13'
steps:
- uses: actions/checkout@v4
- name: Fetch branches
run: |
git remote set-branches --add origin deploy
git fetch --depth=5 origin master deploy
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup cache
id: cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-${{ env.pythonLocation }}-pip-cache-version-1-${{ hashFiles('**/requirements.txt') }}}-${{ hashFiles('**/user_requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ env.pythonLocation }}-pip-cache-version-1-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/user_requirements.txt') }}
${{ runner.os }}-${{ env.pythonLocation }}-pip-cache-version-1-
path: |
~/.cache/pip
- name: Install Python dependencies
run: |
pip3 install -U wheel --upgrade-strategy eager
pip3 install -U -r requirements.txt -r user_requirements.txt pytest-cov coveralls --upgrade-strategy eager
- name: Lint ./tests
run: python3 -m flake8 --config=tox_tests.ini ./test/
- name: Lint ./classes
run: python3 -m flake8 --config=tox_classes.ini ./classes/
- name: Lint code
run: python3 -m flake8 ./
- name: Pytest
run: |
python3 -W default::Warning -m pytest \
--cov=chatcommunicate \
--cov=findspam \
--cov=globalvars \
--cov=spamhandling \
--cov=datahandling \
--cov=chatcommands \
--cov=helpers \
-n 3 \
--dist loadgroup \
--timeout=300 \
test