-
Notifications
You must be signed in to change notification settings - Fork 14
41 lines (41 loc) · 1.28 KB
/
push.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
on: [push]
name: Build and Test
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Curl
if: ${{ matrix.python-version == '3.9' }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- name: Prepare
if: ${{ matrix.python-version == '3.9' }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
chmod +x ./cc-test-reporter && ./cc-test-reporter before-build
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test with pytest
run: |
python -m pytest --cov=elasticpypi --cov-report=term-missing --cov-report=xml
- name: Lint
run: |
flake8 -v
- name: Report
if: ${{ matrix.python-version == '3.9' }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
./cc-test-reporter after-build --coverage-input-type coverage.py