-
-
Notifications
You must be signed in to change notification settings - Fork 75
53 lines (44 loc) · 1.47 KB
/
tests.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
name: Run pytest
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# When changing this matrix, you have to change the "after_n_builds"
# in the .github/codecov.yml file. It must match the number of builds
# being started considering the matrix.
# See the following links for more information:
# https://docs.codecov.com/docs/notifications#preventing-notifications-until-after-n-builds
# https://docs.codecov.com/docs/pull-request-comments#after_n_builds
icalendar-version:
- "5" # means (>=5.0.0,<6.0.0)
- "6" # means (>=6.0.0,<7.0.0)
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Set up Python 3.9"
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: "Install poetry"
uses: abatilo/actions-poetry@v3
with:
poetry-version: "2.0.1"
- name: "Install icalendar ${{ matrix.icalendar-version }} and other dependencies"
run: |
poetry add icalendar~=${{ matrix.icalendar-version }}.0 --no-interaction
- name: "Test with pytest"
run: |
poetry run coverage run test.py
poetry run coverage xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false