-
Notifications
You must be signed in to change notification settings - Fork 6
72 lines (63 loc) · 1.9 KB
/
pythontests.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
63
64
65
66
67
68
69
70
71
72
---
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# This workflow will install a variety of Python versions and other
# dependencies to run tests. For more information see:
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python testing
on:
push:
branches:
- main
- stable-*
pull_request:
branches:
- main
- stable-*
# Run once per week (Monday at 04:00 UTC)
schedule:
- cron: '0 4 * * 1'
jobs:
build:
runs-on: >-
${{ contains(fromJson(
'["3.6"]'
), matrix.python-version) && 'ubuntu-20.04' || 'ubuntu-latest' }}
strategy:
matrix:
python-version:
# Installing takes > 30 minutes now:
# - 3.6
- 3.7
- 3.8
- 3.9
# Will fail due to some dependencies having trouble:
# - '3.10'
# Will fail due to frozenlist build failure:
# - '3.11'
steps:
- name: Check out antsibull-core
uses: actions/checkout@v3
with:
path: antsibull-core
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install
poetry update
working-directory: antsibull-core
- name: Test with pytest and upload coverage stats
run: |
./test-pytest.sh
poetry run coverage xml -i
working-directory: antsibull-core
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
working-directory: antsibull-core