-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (55 loc) · 1.62 KB
/
ci.yml
File metadata and controls
63 lines (55 loc) · 1.62 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches: [ main, irods-plugin ]
pull_request:
branches: [ main, irods-plugin ]
jobs:
build:
strategy:
matrix:
include:
- python_version: "3.10"
name: "Python ${{ matrix.python_version }}"
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv lock
pipenv install --system --dev
- name: Run flake
run: |
pipenv run flake8
- name: Run tests
run: |
pytest --cov
- name: Store coverage file
uses: actions/upload-artifact@v4
with:
name: coverage
path: .coverage.${{ matrix.python_version }}
- name: Display coverage
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_PR_RUN_ID: ${{ inputs.GITHUB_PR_RUN_ID }}
MINIMUM_GREEN: 100
MINIMUM_ORANGE: 70
MERGE_COVERAGE_FILES: false
ANNOTATE_MISSING_LINES: false
ANNOTATION_TYPE: warning
COMMENT_ARTIFACT_NAME: python-coverage-comment-action
COMMENT_FILENAME: python-coverage-comment-action.txt
COMMENT_TEMPLATE: The coverage rate is `{{ coverage.info.percent_covered | pct }}`{{ marker }}
COVERAGE_DATA_BRANCH: python-coverage-comment-action-data