[stable-1] Fix CI #277
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# 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 |