-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (46 loc) · 1.45 KB
/
ci.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
name: 'CI'
on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: "0 19 * * 1"
jobs:
run-tests:
env:
BEANSTALK_VERSION: '1.12'
runs-on: ubuntu-latest
strategy:
matrix:
pythonversion: ['3.6', '3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- name: cache beanstalkd
id: cache-beanstalkd
uses: actions/cache@v2
with:
path: ~/beanstalks
key: ${{ runner.os }}-${{ env.BEANSTALK_VERSION }}
- name: build beanstalkd
if: steps.cache-beanstalkd.cache_hit != 'true'
run: |
mkdir -p ~/beanstalks
curl -LJ -o /tmp/beanstalkd.tar.gz https://github.com/beanstalkd/beanstalkd/archive/v${{ env.BEANSTALK_VERSION }}.tar.gz
tar -C /tmp -xvf /tmp/beanstalkd.tar.gz
cd /tmp/beanstalkd-${{ env.BEANSTALK_VERSION }}
make
mv beanstalkd ~/beanstalks/
- name: set up python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pythonversion }}
- name: install dependencies
run: "python -m pip install -r requirements-tests.txt -e ."
- name: lint with flake8
run: flake8 pystalk/ tests/
- name: test with pytest
run: pytest --cov=pystalk/ --cov-report=term-missing --cov-fail-under=60 tests/
env:
BEANSTALKD_PATH: ~/beanstalks/beanstalkd
- name: check mypy
run: mypy pystalk/ tests/